Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding throw and throws

 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use some punctuation because your post is unreadable.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50241
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a lot in the Java™ Tutorials.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic