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 are the different types of constructor?
What are methods of a class?
What is nan inf?
If you are given the name of the function at run time how will you invoke the function?
What is integer valueof?
Is empty set an element of empty set?
What is use of set in java?
How do you stop a thread in java?
Is it possible to override private or static method in java?
What is the advantage of preparedstatement over statement?
What exceptions occur during serialization?
What happens when I use / and % with a negative numerator?
How can we make a class singleton?
What is the difference between an array and an array list?
What are the steps in the jdbc connection?