What is exactly difference between throw and throws in java?

Showing Answers 1 - 8 of 8 Answers

user exception are created by calling throw.

While checked exceptions are indicated using throws. i.e. any function that specifies throws <Excetion list> indicates that these are all the probabe exceptions that are possible on execution of this function.

  Was this answer useful?  Yes

ajaink2008

  • Nov 21st, 2007
 

Throw is used to pass an exception up to the method that called it
Throws is used to indicate that method pass exception to the method that the method called

  Was this answer useful?  Yes

imwim

  • May 1st, 2010
 

To manually throw a exception we used throw (user defined exception) and throws are default exception which we used when we use bufferreader.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions