Java - Interview
Java Interview Java Script
Home
Multithreading
Hibernate
Spring
Android
Miscellaneous
TrackWise
TrackWise Tutorial
TrackWise Interview
SCJP
Object
Abstract
Array
Class
Constructor
Exception
Interview
Java
Spring
Hibernate
JSF
PL / SQL
JSP / Servlet
Web Services
Designing Patterns
Others
>>>
ERROR
Offensive Security
Struts 2
JSF
PHP
JDBC
JAVA
AWS
KOTLIN
Web Services
Sunday, 22 February 2015
How to create custom exceptions? If I want an object of my class to be thrown as an exception object, what should I do?
Your class should extend class Exception, or some more specific type thereof.
The class should extend from Exception class. Or you can extend your class from some more precise exception type also.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment