throw and throws

prashantSum's Avatar
what is the difference between throw and throws
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
keyword that allows the user to throw an exception or any class that implements the "throwable" interface.

keyword used in method declarations that specify which exceptions are not handled within the method but rather passed to the next higher level of the program.

I hope it clears the doubt in your mind.