GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes throw and   throws Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "throw and   throws" Watch "throw and   throws" New topic
Author

throw and throws

vignesh kaladi
Greenhorn

Joined: Feb 01, 2006
Posts: 5
hi ,
What is the diff. between the throw and throws
Srinivas Tuta
Greenhorn

Joined: Oct 12, 2005
Posts: 10
Hi,

using throw you can throw an exception.

when u say a method throws an execption, u are reporting the compiler that the method is capable of throwing an exception, which you are not catching.


Srinivas
SCJP1.4
[ February 02, 2006: Message edited by: Srinivas Tuta ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: throw and throws