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
How infinite loop is declared?
What is the intersection and union methods?
What are methods in java?
Can you access the private method from outside the class?
What are the various access specifiers for java classes?
Where and how can you use a private constructor?
What is the purpose of using java.lang.class class?
What is the similarity between dynamic binding and linking?
Can an abstract class be a final class?
What does || || mean in math?
How do you compare characters in java?
What is meant by attribute?
Write a program to print all permutations of string?
What is classname class in java?
What is the platform?