Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / aswini
Without using instance of the class means no need to use the class object to call static variable insted directly use the classname to use the static variable.moreover ,only one copy of static varible avaible to use all the classes.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is internal iteration in java se 8?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
Can we nested try statements in java?
What is the maximum size of arraylist in java?
What are the core java topics?
List the three steps for creating an object for a class?
What is command line used for?
What is difference between char array and string?
Tell me are there implementations for sorting and searching in the java libarary?
How many types of voids are there?
Can we extend immutable class?
Give few difference between constructor and method?
List the interfaces which extends collection interface?
how to deploy tomcatserver to weblogic server? write d following steps?
What do you mean by constant time complexity?