Tuesday, March 10, 2009

What is a local, member and a class variable (CoreJava)

Question :What is a local, member and a class variable? (CoreJava)
Answer :Variables declared within a method are "local" variables.
Variables declared within the class i.e not within any methods are
"member" variables (global variables).
Variables declared within the class i.e not within any methods and are
defined as "static" are class variables

No comments: