a anand


{ City } hyderabad
< Country > india
* Profession *
User No # 73269
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 13
Users Marked my Answers as Wrong # 12
Questions / { a anand }
Questions Answers Category Views Company eMail




Answers / { a anand }

Question { Infosys, 8665 }

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

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