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
What is indexof in java?
What is final method in java?
What is polymorphism in java? What are the kinds of polymorphism?
Is integer passed by reference in java?
Where are the local variables stored?
What is the range of a character variable?
Explain the difference between call by refrence and call by value?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
What is string subsequence method?
Which is better ascii or unicode?
What 4 doubled?
What is ‘has a’’ relationship in java?
what is meant by Byte code concept in Java?
Is void a data type?
Why enumeration is faster than iterator?