When you create an exception for a method, you can use the classical exceptions or the new class-based exceptions. If you use the class-based method, at runtime exceptions are represented as objects of exception classes.
The method for a class or interface already exists.
You defined exceptions for a method and can implement the method.
See also: