Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / za
because it help us to declare class field asglobal variable
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is object in java?
What is a layout manager and what are different types of layout managers available in java awt?
Where are global variables stored?
What are the two ways in which thread can be created?
Differentiate between run time error and syntax error.
Can a class be protected in java?
What is the transient keyword?
Can singleton class be cloned?
What is the return type of the main method?
What are implicit objects in java?
What is a default constructor and also define copy contrucyor?
What is final keyword?
Can a class be private in java?
What is the meaning of 3 dots in java?
What best practices should you follow while writing multithreaded code in java?