JavaSwitch语句:常量表达式是必需的,但它是常量
public abstract class Foo { ... public static final int BAR; public static final int BAZ; public static final int BAM; ...}
public static String lookup(int constant) { switch (constant) { case Foo.BAR: return "bar"; case Foo.BAZ: return "baz"; case Foo.BAM: return "bam"; default: return "unknown"; }}
constant expression required
Foo.BA_
犯罪嫌疑人X
相关分类