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
Give any two differences between C++ and java.
What does indexof return in java?
Realized?
What is split return?
What is meant by attribute?
Is arraylist an object in java?
When is the garbage collection used in Java?
Can we declare an interface as final?
What do you understand by the term string pool?
Is Java a dying language?
what do you mean by java annotations?
Which sorting is used in arrays sort in java?
What is a vector in java?
What is the significance of continue jump statement? Explain with an example.
how we can make a write-only class in java?