Question: Which of the following displays Error when a student ID is less than 1000 or more than 9999? a. if(stuId < 1000) if(stuId > 9999)
Which of the following displays Error when a student ID is less than 1000 or more than 9999?
a. if(stuId < 1000) if(stuId > 9999)
System.out.println("Error");
b. if(stuId < 1000 && stuId > 9999)
System.out.println("Error");
c. if(stuId < 1000)
System.out.println("Error");
else
if(stuId > 9999)
System.out.println("Error");
d. Two of these are correct.
Step by Step Solution
3.32 Rating (164 Votes )
There are 3 Steps involved in it
c ifstuId 1000 ... View full answer
Get step-by-step solutions from verified subject matter experts
