Assuming the following enum declaration exists:
enum Dog { POODLE, BOXER, TERRIER }
What will the following statements display?
a. System.out.println(Dog.POODLE + "\n"
+ Dog.BOXER + "\n"
+ Dog.TERRIER);
b. System.out.println(Dog.POODLE.ordinal() + "\n"
+ Dog.BOXER.ordinal() + "\n"
+ Dog.TERRIER.ordinal());
c. Dog myDog = Dog.BOXER;
if (myDog.compareTo(Dog.TERRIER) > 0)
System.out.println(myDog + " is greater than "
else
System.out.println(myDog + " is NOT greater than "
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here