public class AccessProperty
{ static int i=47;
public void call()
{ System.out.println("调用call()方法");
for(i=0;i<3;i++)
{
System.out.println(i+"");
if(i==2)
{
System.out.println("\n");
}
}
public AccessProperty ( )
{ }
public static viod main(String[] args)
{
AccessProperty t1=new AccessProperty ( );
AccessProperty t2=new AccessProperty ();
t2.i=60;
System.out.println(t1.i++);
t1.call();
System.out.println( t2.i);
t2.call();
}
}
t2.i为什么等于3?是怎么算的?
|