File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "throw and   throws" Watch "throw and   throws" New topic

throw and throws

vignesh kaladi

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

Joined: Oct 12, 2005
Posts: 10

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.

[ February 02, 2006: Message edited by: Srinivas Tuta ]
I agree. Here's the link:
subject: throw and throws
It's not a secret anymore!