Question: Hello! My code works for the most part, I was wondering if it was possible to set up a try / catch to check if
Hello! My code works for the most part, I was wondering if it was possible to set up a trycatch to check if the age entered is within the valid range? Java only please and thank you!
System.out.printlnPlease enter in the amount of students you would like to enroll: ;
Scanner sc new ScannerSystemin;
int newEnrollment scnextInt;
scnextLine;
for int i ; i newEnrollment; i
System.out.printlnStudenti information:";
System.out.printlnFirst Name: ;
String first scnextLine;
System.out.printlnLast Name: ;
String last scnextLine;
System.out.printlnAge: ;
int age scnextInt;
scnextLine;
valid age range :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
