Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / vaishnavi
To answer Soumya's question, instance variables are declared at class level, but the instance variables still belong to an instance/object. But static variables belong to a class.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
What is a class object?
Why is stringbuffer thread safe?
How finally used under exception handling?
Does chrome use java?
What is the difference between static method and instance method in Java?
define the terminology association.
How does singleton class work?
Is ruby built on java?
Can you override a final method?
What is the syntax and characteristics of a lambda expression?
What are the 4 versions of java?
What is the difference between math floor and math round?
What is the final keyword in java?
What is the original name of java?