google Ads

Friday, July 17, 2009

Scope

Scope in JAVA


A variable’s scope is the block of code within which the variable is accessible and determines when the variable is created and destroyed. The location of the variable declaration within your program establishes its scope and places it into one of these four categories:

Member variable
Local variable
Method parameter

Exception-handler parameter


A member variable is a member of a class or an object. It can be declared anywhere in a class but not in a method. The member is available to all code in the class.





No comments:

Post a Comment