This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Who will Handles Exception we have been thrown by using Throws  RSS feed

 
sirisha makkapati
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiler will Handles Exception we have been thrown by using Throws Keyword .is it right??
Any one can tell me how compiler will handels this Exceptions.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler doesn't handle exceptions. It will check that the calling code at least does something with and declared checked exceptions, otherwise it will not let the code compile. It will not do any checking for unchecked exceptions. Exceptions are actually thrown during runtime, so its too late for the compiler to get involved then.
[ December 21, 2006: Message edited by: Paul Sturrock ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!