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 do you check if two strings are equal in java?
What is the dot operator?
What is anagram word?
Why runnable interface is used in java?
What is the length of a string?
What is == in java?
Explain about the select method with an example?
For class CFoo { }; what default methods will the compiler generate for you>?
What does sizeof return?
What is arrays sort in java?
Can list be null in java?
How many bits is a string in java?
What is the purpose of skeleton and stub?
Explain the difference between private, public, package and protected in java?
What are streams?