Which of the following displays Error when a student ID is less than 1000 or more than

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)
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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: