package first;
public class for_protect {
private int age=10;
int number = 100;
public void show(){
System.out.println(number);
System.out.println(this.number=1000);
System.out.println(this.number);
//private的变量用this
//static变量用类名.变量
//public 直接个示或this.number
}
public static void main(String args[]){
for_protect test = new for_protect();
test.show();
}
}
原文:http://www.cnblogs.com/perl6/p/7215242.html