class Main {
enum Level {
LOW,
MEDIUM,
HIGH
}
public static void main(String[] args) {
System.out.println("Hello World!");
// Pig pg = new Pig();
// pg.animalSound();
// pg.sleep();
// pg.type();
{
Level myVar = Level.MEDIUM;
System.out.println(myVar);
switch(myVar) {
case LOW:
System.out.println("This low");
break;
case MEDIUM:
System.out.println("This medium");
break;
case HIGH:
System.out.println("This high");
break;
default:
System.out.println("default");
}
}
for (Level myVar : Level.values()) {
System.out.println(myVar);
}
}
}
interface Animal {
public void animalSound();
public void sleep();
}
class Pig implements Animal, SecondAnimal {
public void animalSound() {
System.out.println("yoohoo");
}
public void sleep() {
System.out.println("zzzz");
}
public void type() {
System.out.println("unggas");
}
}
interface SecondAnimal {
public void type();
}