class GrapeDemo1
{
public static void main(String[] args){
print(Grap.A);
}
public void print(Grap g){
System.out.println(g.getValue());
}
}
enum Grap{
A("10"),B("20");
private Grap(){}
private String value;
private Grap(Grape value){
this.value = value;
}
public String getValue(){
return value;
}
}
这个怎么就是编辑不通过,急呀, |
|