标签:java
class TestLogic { public static void main(String[] args) { boolean a = true; boolean b = false; System.out.println(a&b); System.out.println(a&&b); System.out.println(a|b); System.out.println(a||b); System.out.println(!a&b); System.out.println(a^b); int i1=10; if(a&(i1++)>0){ System.out.println("今天天气晴朗,没有雾霾"); }else{ System.out.println("难得没有雾霾"); } System.out.println(i1); int i2=10; if(a&&(i2++)>0){ System.out.println("今天天气晴朗,没有雾霾"); }else{ System.out.println("难得没有雾霾"); } System.out.println(i2); } }
标签:java
原文地址:http://9815936.blog.51cto.com/9805936/1599966