logo

Crowdly

¿Hay errores en el siguiente código? class UnderageException extends RuntimeE...

✅ 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);

//...

}

}

More questions like this

Want instant access to all verified answers on moodle.uam.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!