Answer Posted / vatsal doshi
The answer is in the question itself.
What is static? Something which belongs to a class and not its objects.
So if in a class, we have some variables, having single copy, we call them static.
Similarly some methods may be actually manipulating these static variables, so those methods are also static.
However, the class itself is static only if it belongs to some class(Definition of static)
So, for a class to be static, it must be a nested class. Such nested classes are called as Top Level Nested Classes in Java.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Explain java coding standards for methods?
What is default switch case? Give example.
What is Classloader in Java?
how to one war file class to another war file class?
What does g mean in regex?
What is a singleton puppy?
Do you need to import math in java?
what are abstract functions?
What is null mean in java?
What is mean by encoding?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
What are the advantages and disadvantages of reference counting in garbage collection?
What is a jit compiler?
How do you read a char in java?
How does hashmap work in java ?