static variable is a class variable which value remains
constant for the entire class?? variable means value is
changed....hear value is not changed... why it is called
static variable

Answer Posted / a anand

A variable which is declared with 'static' keyword called
"static variable" or "class variable". Because,when we
execute the java application JVM first search for the class
and it loads into the JVM's memory.Now, it open the class
and searches for static variables if JVM finds the static
variable in the class then JVM will allot memory for the
static variables in HEAP area.Memory for the static
variables will be allotted only once at the time of loading
the class, that means static variable is only one per the
class.Hence, we call static variable as class variable.

Is This Answer Correct ?    13 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java ee technologies?

469


What every java developer should know?

475


Which is best eclipse for java?

487


Define the struts in the j2ee framework?

506


What is wildfly java?

481






What is a plugin in java?

475


What is urn?

529


What is use of final keyword in java?

507


What is conversational state?

539


Is tomcat a java ee?

487


What is distributed application?

538


Is string a primitive data type in java?

484


Is object a composite data type in java?

492


Why awt is used in java?

500


Why java is not 100% object oriented language?

496