File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes compile time exception vs runtime exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "compile time exception vs runtime exception" Watch "compile time exception vs runtime exception" New topic
Author

compile time exception vs runtime exception

Saral Saxena
Ranch Hand

Joined: Apr 22, 2011
Posts: 202

Hi Folks,
wats the differnce between compile time and runtime exception..? please explain the justfied explanation with an example.!!
rajeshd rajd
Greenhorn

Joined: Sep 06, 2011
Posts: 1

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
Bartender

Joined: May 31, 2011
Posts: 1776
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

Joined: Oct 13, 2005
Posts: 37936
    
  22
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

Joined: Oct 21, 2000
Posts: 4340
    
    2

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.


SCJP
Visit my download page
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37936
    
  22
The thing about logic errors is that you may not find out about them until they have done real harm.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compile time exception vs runtime exception
 
Similar Threads
Final Class cannot be instantiated
Exceptions in JSP
confused in runtime exception and compile time exception
Runtime & Compile time Error
Exception