throws keyword in java
- 17th Aug 2017
- 0
- 2929
- importance of using throws keyword in java with an example significance of using throws keyword in java throws keyword in java with an example throws keyword n java
The “throws” keyword can be applied to a method to indicate that, the method raises particular types of exceptions and it is not handling that exception. So this signals the caller that, It has to handle the exception thrown by the method. Example: public class ReadFileExample { public method readFile(String filename) […]