2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Difference between throws and throw ?

when are they used ,give brief description on it,
userimage

Throws clause is  not used  to handle an exception. Whenever throws clause is used against a method ,the caller of the method must handle that particular exception by writing try and catch block

Throw clause is used to forcebily  create an exception and handle it using throw.Throw clause is used in between testing.This is used to create user defined exceptions and throw them out.

Answer is