枚举练习
package cn.meiju; public enum Learn { L1,L2,L3 } package cn.meiju; public class Worker { public void choose(Learn learn) { switch(learn) { case L1: System.out.println("JAVA初级程序员"); break; case L2: System.out.println("JAVA高级程序员"); break; case L3: System.out.println("JAVA架构师"); } } public static void main(String[] args) { Worker worker = new Worker(); worker.choose(Learn.L2); } }