Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime Exception vs. Exception

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
What is differnce between Runtime Exception and Exception?
Thanks
 
Jeremy Thornton
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably there isn't one as exceptions must occur at run time...
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A RuntimeException is actually a specific subclass of Exception. You might be thinking of the difference between checked and unchecked exceptions. A RuntimeException (or any subclass of it) is unchecked - meaning that your method does not have to explicitly declare it in it's throws clause or wrap it in a try/catch block.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic