标签:red pes bre rac com public require image lse
//Incompatible types. Found: ‘boolean‘, required: ‘char, byte, short, int, Character, Byte, Short, Integer, String, or an enum‘ //每个条件语句体后,都需要写break,不然会穿透到下一个条件中去 int x = 10; boolean flag = true; switch (x) { case 10: System.out.println("这是5"); //break; default: System.out.println("这是default"); break; }
public static void main(String[] args) { String[] arr = {"x", "y", "z", "m"}; for (String str : arr) { System.out.println(str); } System.out.println("===================="); forear(); } //.class文件反编译后 public static void forear() { String[] arr = new String[]{"x", "y", "z", "m"}; for (int i = 0; i < arr.length; ++i) { String var5 = arr[i]; System.out.println(var5); } }
标签:red pes bre rac com public require image lse
原文地址:https://www.cnblogs.com/bajiaotai/p/12849696.html