What is the difference between static and non-static
variables?
Answer Posted / sathya
Static variables:
There is only one copy of static variable and even
when the class is instatiated, the value remains the same.
Non-static variables:
Every time the class is instatiated, the objest has
their own copy of these variables.
Is This Answer Correct ? | 72 Yes | 13 No |
Post New Answer View All Answers
Is java 9 released?
What are three ways in which a thread can enter the waiting state in java programming?
What is the role of garbage collector in java?
What is empty string literal in java?
what are synchronized methods and synchronized statements? : Java thread
How to print an arraylist in java?
What is an abstract method in java programming?
What is array and arraylist in java?
What are recursive functions?
Why does abstract class have constructor?
What is classes in java?
How the metacharacters are different from the ordinary characters?
Which is better stringbuilder or stringbuffer?
What is navigable map in java?
What is loop in java?