PPT Slide
- To recognize the exceptional state, use standard if-else logic.
- To respond to them, you can create your own Exceptions. Exceptions are objects So you really define your own classes of exception
- All Exceptions you create are extensions of java.lang.Exception
class QueueEmptyException extends Exception
public QueueEmptyException( ) { }
public QueueEmptyException(String strMessage)
Exceptions: Creating Your Own