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
What are advantages of exception handling in java?
What is meant by oops concept in java?
Explain a situation where finally block will not be executed?
State the main difference between c++ and java?
What is array list in java?
Which is the best approach for creating thread ?
What is ‘is-a ‘ relationship in java?
How to perform linear search in java?
What do you mean by data type?
How will you communicate between two applets?
Explain JMS in detail.
What is t in parametric equations?
What is variable declaration and definition?
What is the structure of java?
Is sizeof a preprocessor?