Showing posts with label exception-list. Show all posts
Showing posts with label exception-list. Show all posts

Thursday, 23 January 2014

throws JAVA KEYWORD

Java:Using throws in Exception Handling

How to throws exceptions in java with example

The throws keyword is used to declare an exception. It gives an information to the programmer that there may occur an exception so it is better for the programmer to provide the exception handling code so that normal flow can be maintained.Exception Handling is mainly used to handle the checked exceptions. If there occurs any unchecked exception such as NullPointerException, it is programmers fault that he is not performing check up before the code being used.