|
Java Reference Home | Smart Soft Home |
||||||||||||||||||||||||||||
|
Variable Visibility
Two things determine variable visibility:
class MyClass{
private int a; //private variable
int b; //package variable
public int c; //public variable
void meth1(int d){ //method argument
int e; //local variable
}
}
In general, variables should be declared to be as invisible as possible. |
||||||||||||||||||||||||||||