Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?

Answer Posted / sumit pal singh

static keyword is mainly used for memory management purpose. And static variable is used for declare the common property of object.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is percentage in java?

569


Can you explain the final method modifier?

563


How to write custom exception in java?

597


Why we go for collections in java?

540


What is the default execution method in java?

620






Is ruby built on java?

529


What is maximum size of arraylist in java?

490


How many threads can java run?

554


What is the difference between arraylist and hashset in java?

514


What is tcp ip in java?

585


What is use of a abstract variable?

534


Difference between object instantiation and construction ?

580


What is java Applet?

645


Write a function to print Fibonacci series and Tribonacci series?

750


how are methods defined?

547