Suppose you write the code to display “Cannot get a driver’s…
Questions
Suppоse yоu write the cоde to displаy "Cаnnot get а driver's license" if age is less than 16 and "Can get a driver's license" if age is greater than or equal to 16. Which of the following code is correct? Select all that apply. I: if (age < 16) System.out.println("Cannot get a driver's license"); if (age >= 16) System.out.println("Can get a driver's license"); II:if (age < 16) System.out.println("Cannot get a driver's license"); else System.out.println("Can get a driver's license"); III:if (age < 16) System.out.println("Cannot get a driver's license"); else if (age >= 16) System.out.println("Can get a driver's license"); IV:if (age < 16) System.out.println("Cannot get a driver's license"); else if (age > 16) System.out.println("Can get a driver's license"); else if (age == 16) System.out.println("Can get a driver's license");