This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Regarding throw and throws Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Regarding throw and throws" Watch "Regarding throw and throws" New topic

Regarding throw and throws

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144

This is santhosh can you tell me which one will throw checked exception and unchecked exception whether throw or throws and another one is what is checked exception please tell me no one give exact meaning.

Thanking you

by santhosh
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

Please use some punctuation because your post is unreadable.

[My Blog]
All roads lead to JavaRanch
Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

throws is used in the method declaration to indicate which exceptions it can potentially throw.

throw is used inside implementations to actually throw an exception.

How To Ask Questions How To Answer Questions
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38041
There is a lot in the Java™ Tutorials.
I agree. Here's the link:
subject: Regarding throw and throws
Similar Threads
Question on Exception
Exception Question
throw exception question
regarding daemon thread in java
Questions about method overloading and throwing exceptions...