Which two are valid?

Which two are valid? (Choose two.)

Which two are valid? (Choose two.)

A.
class EnumTest {
public static void main(String args[]) {
enum Num { ONE, TWO, THREE, FOUR }
System.out.println(Num.ONE);
}

B.
class EnumTest {
enum Days { Sat, Sun, Mon, Tue, Wed, Thu, Fri }
public static void main(String args[]) {
System.out.println(Days.Sat);
}

C.
class EnumTest {
enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 }
public static void main(String args[]) {
System.out.println(Colors.Red);
}

D.
enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }
class EnumTest {
public static void main(String args[]) {
System.out.println(Suit.CLUBS);
}



Leave a Reply 0

Your email address will not be published. Required fields are marked *