枚举类:
public class Eunm {
public enum ttt{
SUCCESS,ERROR
}
public static void ccc(){
System.out.println("我是枚举的自定义方法");
}
}
测试方法:
public class Main {
public static void main(String[] args) {
Eunm.ccc();
Eunm.ttt ttt = T.test(1,0);
if (ttt == Eunm.ttt.SUCCESS){
System.out.println("成功");
}else if (ttt == Eunm.ttt.ERROR){
System.out.println("失败");
}
}
}