What is static variable and static method?
Answer Posted / govardhani
A static variable is a variable who's single copy in memory
is shared by all objects,so any modifications to the static
variable will modify it's value in all objects.
In classes, a static method is one that is called without an
instance of that class, while a non-static method is called
by instances of the class.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Is java still necessary?
What are the two parts of a conditional statement?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
What's the difference between comparison done by equals method and == operator?
Why use string handling in Java?
Are static members inherited to sub classes?
What is the same as procedures?
What is main string [] args?
What is the purpose of checked and unchecked exceptions in JAVA?
Why does java not allow multiple public classes in a java file ?
Is array primitive data type in java?
Where to store local variables?
What are the Class Libraries ?
How do you get the length of a string in java?
Explain some best practices you would apply while using collection in java?