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 a static method be overridden in java?
What is class level lock ?
What is abstraction in java?
What is variable and its types?
Are variables stored in ram?
Why java does not support pointers?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
Write a program to solve producer consumer problem in java?
What is mean by exception?
How do you declare a destructor in java?
how to deploy tomcatserver to weblogic server? write d following steps?
if u open login & logout ,how can udisplay the timelogin & logout members ?
How many static init can you have?
What is an abstract method in java programming?
What are static methods?