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 happens to the Exception object after handling an exception?
What are the pillars of java?
When should we create our own custom exception classes?
What are the different types of java?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is the difference between preemptive scheduling and time slicing in java programming?
What is type parameter in java?
What is java english?
What is math exp in java?
What are the types of relation?
What is string [] java?
Can we override tostring method in java?
When will we prefer to use set and list in java and why?
How many bytes are there?
Is list ordered in java?