When we would like to throw our exceptions, then we can do this using the keyword throw as follows : -
throw new Throwable_subclass
Example : -
throw new ArithmeticException();throw new NumberFormatException();
No comments :
Post a Comment