不捕获返回值的方法的值有什么影响?Java返回问题
它像新开发的内存问题并发症如果返回值没有抓到。
实施例的代码片断:
//reference types
public Object[] thismethodreturnsvalue(){
return new Object[]{new Object(),new Object(),new Object()};
}
//primitive types
public int thismethodreturnsint(){
return -1;
}
public static void main(String a[]){
thismethodreturnsvalue();
thismethodreturnsint();
}
感谢您的生动解答。非常感谢。 – 2011-02-24 22:35:27