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

How do I start learning java?

560


What is reverse function?

576


What is file in java?

562


What does localhost mean?

502


What is static data type in java?

546






What is immutable class in java?

514


How many bytes is a char in java?

533


What does s mean in regex?

553


Explain the importance of thread scheduler in java?

600


Where we write javascript code in html page?

563


What is singleton class in ruby?

564


What is the difference between the paint() and repaint() methods?

589


What is difference between word and integer?

598


What is the base class for error and exception?

556


What is module with example?

516