摘要: java中的i++和++i的区别! public static void method1(){ int x = 5; System.out.print("x+++1+x++ : "); System.out.println(x++ +1 + x++); //5+1+6 } public static void method2(){ /*** 这里的method2和method3的执行顺序是不一样的。 */ int x = 5; System.out.print("(x++)+x : "); System.out.println((x++)+x); //5 阅读全文
posted @ 2012-10-10 16:28 梦你所梦 阅读(127) 评论(0) 推荐(0)