package enum_a;
import java.util.*;
/**
*
* @author cmx
*/
public class enum3
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
System.out.println("Input the Name :(APP,BLOG,CITY,DOG)");
String enumType=in.next();
OK type=Enum.valueOf(OK.class,enumType);
String describe=type.getDescribe();
System.out.println(describe);
}
}
enum OK
{
APP("well"),BLOG("read"),CITY("what?"),DOG("play with");
private String describe;
private OK(String describe)
{
this.describe=describe;
}
public String getDescribe()
{
return describe;
}
}