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
Explain when noclassdeffounderror will be raised ?
What are implicit objects in java?
Write a program to print fibonacci series up to count 10.
What are the fileinputstream and fileoutputstream?
What is token in java?
What is data member in java?
write a program that list all permutations of ABCDEF in which A appears before B?
How to do encapsulation in java?
What is the difference between path and classpath variables?
What do you understand by final value?
Why does java not support operator overloading?
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 is array length in java?
What is methods in java?
What is main difference between variable and constant?