How static variable work in java?
Answer / Mithun Singh Rana
"Static variables are class variables, not instance variables. They are shared among all instances of the class and each instance does not have its own copy of a static variable. Static variables are initialized only once when the class is loaded by JVM. Their values are accessed directly through the reference to the class rather than an object of that class."n
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different types of inner classes?
Difference between start() and run() method of thread class?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?
What is the flag in java?
What will be the initial value of an object reference which is defined as an instance variable?
Is it possible to declare abstract class as final?What happens if we do so?
What’s the difference between the methods sleep() and wait()?
What is an example of a constant variable?
posted in online test
What is difference between array and arraylist in java?
what do you meant by Runtime Polymorphism?
13 Answers BVIMR, IBM, Persistent,
what is comparable and comparator interface?