2020
09-27
09-27
Java返回可变引用对象问题整理
1.问题/***输出:MonApr2610:54:10CST2010*MonApr2610:54:10CST2010*/publicstaticvoidmain(String[]args){Exampletest=newExample(newDate());Dated=test.getDate();doubletenYearsInMillisSeconds=10*365.25*24*3600*1000;d.setTime((long)(d.getTime()-tenYearsInMillisSeconds));System.out.println(d);System.out.println(test.getDate());}publicclassExample{...
继续阅读 >