aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Compile and run time errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Compile and run time errors" Watch "Compile and run time errors" New topic
Author

Compile and run time errors

sonir shah
Ranch Hand

Joined: Nov 01, 2001
Posts: 435
hi ..
I am appearing for SCJP next month.Frankly speaking my concepts are very weak.
Can any one explain the difference between compile and run time errors.How do we come to know which one is a compile time error and which one is run time.
In many examples we see the output as compile error on line 6. compile error on line 13..etc..How can one understand this concept.
Kindly help..
Thanx..
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
The compiler can detect a variety of structural errors in your program but it can't detect certain problems. You need to do a LOT more writing and compiling of your own programs to get a firm grasp - just reading is not enough.
Bill
------------------
author of:
S Khan
Greenhorn

Joined: Sep 11, 2001
Posts: 13
I agree, you cannot become efficient in something like a programming language just by reading and studying, you have to code your own way out.
------------------
- Salman Khan of Ditmas Technologies[/ur/]

[URL=http://java.ditmas.net]Ditmas' Java


-Salman Khan of <A HREF="http://www.ditmas.net" TARGET=_blank rel="nofollow">Ditmas Technologies</A><P><A HREF="http://java.ditmas.net" TARGET=_blank rel="nofollow">Ditmas' Java</A>
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5288
    
  10

I agree with Bill, practice writing and compiling code. That's the only way you will get a really good grasp of what is a compile time and runtime error.
My rule of thumb though:
Most errors that have to do with assigning values of one type to another incompatible type can be caught by the compiler. Errors involving improper use of keywords and other syntax errors will be caught at compile time as well.
Memorize the figure in RHE that shows the direction that automatic conversions can go. This will go far in helping you determine whether an error will be caught at compile time.
Junilu

Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compile and run time errors