aspose file tools*
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
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: 19723
    
  20

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: 39436
    
  28
There is a lot in the Java™ Tutorials.
 
Don't get me started about those stupid light bulbs.
 
subject: Regarding throw and throws