What is static variable and static method?
Answer Posted / niranjanravi
static variables are classes variables not instance
variables .They are instantianted only once for a
class.They are initialised at class load time.
Static method can be referenced with the name of the name
of the particular object of that class. That's how the
library methods like System.out.println works.
| Is This Answer Correct ? | 268 Yes | 54 No |
Post New Answer View All Answers
Can singleton class be cloned?
What is use of super keyword in java?
Is empty set an element of empty set?
Can we print null in java?
What is method overloading in java ?
Explain runtime exceptions?
What is java command?
Explain some best practices you would apply while using collection in java?
What is the purpose of static methods and static variables?
What is the synonym of procedure?
How to reverse a string in java?
What is main method?
Write a program to check for a prime number in java?
What is a static method in java?
Which keyword specify that a variable is effectively final ?