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
How do you sort a list in java?
How do you define a parameter?
What is indexof?
What is the use of arraylist in java?
Difference between operator overloading and function overloading
What does the exclamation mark mean in java?
What is null statement?
Why do we need wrapper class?
What is Java Annotations?
Difference between static binding and dynamic binding?
What do you mean by an interface in java?
What is flag in python?
Can we use this () and super () in a method?
worst case complexities of Quick sort and Merge sort.
What is independent and dependent variables in research?