Easy learning with example program codes

what is the use of throws keyword in java?

throws is used to throw an exception object implicitly. It is used with the method signature. More than one type of exception can be declared with method signature, they should be comma separated.

1.     throws is mainly used to throw checked exception.
2.     If you are calling a method that declares an exception, you must either caught or declare the exception.
3.     We can rethrow the exception.


methodName () throws comma separated list of exceptionClassNames{}


Java interview questions on exception handling

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki