标签:int pre 修改 ssi png java div 实现 declare
public static void swap(Integer a,Integer b) throws Exception { Field field = Integer.class.getDeclaredField("value"); field.setAccessible(true); field.setInt(a, a ^ b); field.setInt(b, a ^ b); field.setInt(a, a ^ b); }
public static void swap(Integer a,Integer b) throws Exception { System.out.println("后a = " + b +"后b = " + a); System.exit(0); }
public static void swap3(Integer a,Integer b) throws Exception { Field field = Integer.class.getDeclaredField("value"); field.setAccessible(true); Integer tmp = a; field.set(a, b); field.set(b, tmp); }
标签:int pre 修改 ssi png java div 实现 declare
原文地址:http://www.cnblogs.com/doStudying/p/7851254.html