- return; 方法返回,后面不再执行
2.引用类型:用在对象上
通过引用变量操纵对象
public class ReferenceTest
{
int a = 4;
public static void main(String[] args)
{
ReferenceTest rt = new ReferenceTest();
ReferenceTest rt2 = new ReferenceTest();
rt2 = rt;
rt.a = 5;
System.out.println(rt.a);
System.out.println(rt2.a);
}
}