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
What is keyword auto for?
Say any two properties in beans?
Can a class extend more than one class?
Explain about main() method in java ?
What is keyset in java?
What is a parameter used for?
What is the difference between a method and a procedure?
Why we override equals() method?
What is the purpose of interface?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
What is an exception in java?
How does hashset works in java?
Why java is said to be pass-by-value ?
What is a string what operation can be performed out with the help of a string?
Wha is the output from system.out.println(“hello”+null); ?