Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   throw and throws (http://www.go4expert.com/forums/throw-and-throws-t482/)

prashantSum 26Oct2005 13:37

throw and throws
 
what is the difference between throw and throws

shabbir 26Oct2005 17:49

Re: throw and throws
 
throw
keyword that allows the user to throw an exception or any class that implements the "throwable" interface.

throws
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.


All times are GMT +5.5. The time now is 07:29.