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
Name some OOPS Concepts in Java?
Explain wrapper classes in java?
Is there any difference between synchronized methods and synchronized statements?
What are the types of methodology?
What is the size of boolean variable?
What is nextint java?
Describe method overriding
How do you create a reference in java?
What is the difference between the paint() and repaint() methods in java programming?
Is vector synchronized in java?
What are the changes in java.io in java 8 ?
Why does java does not support multiple inheritance? Explain
Can we create object of inner class in java?
Explain about object oriented programming and its features?
How does queue work in java?