This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso 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 The Software Craftsman this week in the Agile 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: 146
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: 14688
    
  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: 19958
    
  25

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 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 41615
    
  31
There is a lot in the Java™ Tutorials.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Regarding throw and throws