Can a static variable value be changed in Java?

Опубликовано: 29 Октябрь 2024
на канале: TestArchive
207
2

This video explains about using static keyword on a variable, method, class and block. It cover what static keyword is? and How static keyword binds a method to its class so it can be called by just the class name.variable or methodname in, for example, classname.main(). Java doesn’t need to create an object to call the main() method. Static methods and static variables are shared by the class. When referenced from outside the class, they are called using the classname—for example, StaticClass.method.