提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
切换案例说明的演示
public class Main { public static void main(String arg[]) { int dd = 3; // 0 for Monday , 6 for Sunday //来自 n o w j a v a . c o m switch (dd) { case 0: System.out.println("Monday"); break; case 1: System.out.println("Tuesday"); break; case 2: System.out.println("Wednesday"); break; /** * n o w j a v a . c o m 提 供 **/ case 3: System.out.println("Thursday"); break; case 4: System.out.println("Friday"); break; case 5: System.out.println("Saturday"); break; case