public class Test1 { public static void main(String[] args) { int i=0; if (3>2 || (i++)>0){ System. out .println(i); } } }
public class Test1 { public static void main(String[] args) { int i=0; if (3>2 | (i++)>0){ System. out .println(i); } } }
public class Test2 { public static void main(String[] args) { // TODO Auto-generated method stub int i=0; if ((i++>2) && (i++)>2){ System. out .println("i=" +i); } else { System. out .println(i); } } }
public class Test2 { public static void main(String[] args) { // TODO Auto-generated method stub int i=0; if ((i++>2) & (i++)>2){ System. out .println("i=" +i); } else { System. out .println(i); } } }
原文地址:http://blog.csdn.net/simongeek/article/details/45014405