Difference between static methods, static variables, and static classes in Java.
Answer Posted / nashiinformaticssolutions
A variable, method, or class can be made static by using the static keyword. A static class cannot be instantiated. When both objects or instances of a class share the same variables, this is referred to as static variables. Static methods are simply methods that refer to the class in which they are written.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you stop a thread in java?
What is the purpose of the system class in java?
How do you declare an array in java?
Can we make main() thread as daemon?
Can a private method of a superclass be declared within a subclass?
What are the two main uses of volatile in Java?
What is an argument in java?
What is the ==?
Explain features of interfaces in java?
What is the common usage of serialization? What exceptions occur during serialization?
What is return data type?
What are methods of a class?
What is string builder in java?
what is meant by abstract class?
What is the difference between jfc & wfc?