Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / aswini
Without using instance of the class means no need to use the class object to call static variable insted directly use the classname to use the static variable.moreover ,only one copy of static varible avaible to use all the classes.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the paint() and repaint() methods in java programming?
What is sortedmap in java?
What is the use of private static?
Explain about arraylist?
What is ctrl m character?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
What is java lang object?
Can we define constructor in inner class?
Can we extend a class with private constructor?
What is a top level class in java?
What language is java written?
Is singleton set an interval?
Explain reverse a linked list recursive java solution?
What are the rules for naming an array?
Which is the class in java?