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 print array in java?
What is java object name?
What are the features in java?
How you can force the garbage collection?
What is a method in java?
What is boolean data type in java?
Can we access instance variables within static methods ?
What restrictions are placed on method overloading in java programming?
Why strings in java are called as immutable?
Do I need to import java.lang package any time? Why?
Does unicode support all languages?
What is the difference between math floor and math round?
What is procedure writing?
what is the constructor and how many types of constructors are used in java?
Can we restart a dead thread in java?