Return to site
Return to site

☕🎓JAVA CERTIFICATION QUESTION: Exception

· java,ocp

Which statement is true? (Select 2)

* RuntimeException extends Exception

* RuntimeException extends Throwable

* Exception extends Error

* RuntimeException and its subclasses are unchecked exceptions.

#java #certificationquestion #ocp

https://www.udemy.com/course/ocp-oracle-certified-professional-java-developer-prep/?referralCode=54114F9AD41F127CB99A

Answer:

RuntimeException extends Exception.

RuntimeException and its subclasses are unchecked exceptions.

And:

Exception extends Throwable

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Exception.html

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/RuntimeException.html

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Error.html

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Throwable.html

https://www.oracle.com/technical-resources/articles/enterprise-architecture/effective-exceptions-part1.html

 

Previous
DESIGN PATTERN: Mediator
Next
there will be no string template feature in JDK 23.
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save