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 developer?

470


What are container services?

538


On which platform j2ee is based?

523


Why is java important for internet?

457


whay java does not support bass by reference

2352






Which edition of java is used for developing web application?

417


What are different modules in spring?

523


What is advance java?

500


What is cmp in j2ee?

489


What is component contract?

526


Is string an object in java?

456


Is java 100 percent pure object oriented?

499


Describe secure socket layer (ssl)?

511


What do you mean by the deployment descriptor?

504


Which compiler is used in java?

478