✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
¿Hay errores en el siguiente código?
class UnderageException extends RuntimeException {
public UnderageException(int age) {
// ...
}
// ...
}
public class CourseRegistry {
public void enroll(int age) {
if (age < 18 ) throw new UnderageException(age);
//...
}
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!