package com.example.demo; import java.io.PrintStream; 
 // Referenced classes of package com.example.demo://  
          ab public class EnumTest{ public EnumTest(){}
           public static transient void main(string args[])
           {ab a = ab.aaa;
           /* anonymous class not found */
           class _anm1 {} 
           
           switch(_cls1..SwitchMap.com.example.demo.ab[a.ordinal()])
           {
            case 1: // '\001'system.out.println("aaa");
            // fall through 
           
            case 2: // '\002'system.out.println("bbb");
            // fall through
             default:return;
            
            }

}} 
取得 enum 的ordinal();
ordinal() 方法是public final 类型的,不可被override。

相关文章:

  • 2021-07-06
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2021-07-18
  • 2021-08-27
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-02-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案