if 语句:
public class ifguanjianzi { public static void main(String[] args) { if(2<1){ System.out.println("1234567"); } else { System.out.println("12"); } } }
switch 语句:
public class switchyuju { public static void main(String[] args) { switch (2+5){ case 8: System.out.println("8"); break; case 7: System.out.println("7"); break; default: System.out.println("无匹配"); break; } } }
标签:语句,java,System,break,switch,println,public From: https://www.cnblogs.com/HPUjingchen/p/17362908.html