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
Author

Regarding throw and throws

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
hi,

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Please use some punctuation because your post is unreadable.


[My Blog]
All roads lead to JavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38041
    
  22
There is a lot in the Java™ Tutorials.
 
I agree. Here's the link: http://aspose.com/file-tools
 
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...