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

compile time exception vs runtime exception

 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
wats the differnce between compile time and runtime exception..? please explain the justfied explanation with an example.!!
 
rajeshd rajd
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

friend,

if you written syntax wrongly then compile time error will occured.
Runtime exception will occured in your class file running in jvm.

Saral Saxena wrote:Hi Folks,
wats the differnce between compile time and runtime exception..? please explain the justfied explanation with an example.!!



 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking the difference between a Checked Exceptions vs Runtime Exceptions? or between Compile time errors and Runtime errors?

I believe in both case you will get useful answers when you search the forum.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50206
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch rajeshd rajd.

You are right to talk about compile time errors, since exceptions cannot occur at compile time.
 
Randall Twede
Ranch Hand
Posts: 4481
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the question is kind of ambiguous but i think Rajeshd answered it. compile time errors are pretty easy to fix. run time exceptions are usually not that hard either, but harder than compile time errors. the worst are the logic errors.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50206
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thing about logic errors is that you may not find out about them until they have done real harm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic