Examlex
Rewrite the following nested if-else statement as an equivalent switch statement.
if (letter == 'A' | | letter == 'a') System.out.println("Excellent");
else if (letter == 'B' | | letter == 'b') System.out.println("You can do better");
else if (letter == 'C' | | letter == 'c') System.out.println("Try harder");
else if (letter == 'D' | | letter == 'd') System.out.println("Try much harder");
else System.out.println("Try another major! ");
Q18: If a NullPointerException arises in the try
Q20: Unlike the String class where you must
Q24: All Java classes must contain a main
Q25: A management approach in which employees are
Q42: Abstract methods are used when defining<br>A) interface
Q42: A Polygon object in Java can be<br>A)
Q47: You may use the super reserved word
Q47: Provide an example of how you might
Q48: Java doesn't support multiple inheritance; but it
Q64: Which library package would you import to