Java Coder
What is the importance of static variable?
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners

hi,

What is the importance of static variable?

thanks

Advertisement
View Answers

April 12, 2013 at 10:38 AM


Hi,

The Static variable which belongs to the class and not to object(instance). Only once initialized the Static variables for at the starting of an execution. These variables will be initialized first, before the initialization of any instance variables. We can access directly the static variable by it's class name and no requirement of any object.

For more related articles then visit this link

http://www.roseindia.net/java/beginners/staticvariable.shtml

thanks,