wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Runtime & Compile Time Errors . PLS HELP !!!!! 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 "Runtime & Compile Time Errors . PLS HELP !!!!!" Watch "Runtime & Compile Time Errors . PLS HELP !!!!!" New topic
Author

Runtime & Compile Time Errors . PLS HELP !!!!!

kaushik banerjee
Ranch Hand

Joined: Mar 11, 2001
Posts: 56
Hi fellow ranchers,
I have a problem with a concept which is getting a few wrong answers in the Mocks . I will be extremely grateful if any of can take the trouble to clear the same . It is:-
There are questions with options that the a) code will not compile at runtime : b) the code will give runtime errors . Now when I know that the code is erroneous & will not work , how do I differentiate between these 2 options, that is what sort of errors are caught at compile time & what sort of errors is the responsibility of the runtime environment(JVM) . Please can someone explain .
Thanks in advance.
Regards,
Kaushik

Lam Thai
Ranch Hand

Joined: Apr 02, 2001
Posts: 117
Originally posted by kaushik banerjee:
Hi fellow ranchers,
I have a problem with a concept which is getting a few wrong answers in the Mocks . I will be extremely grateful if any of can take the trouble to clear the same . It is:-
There are questions with options that the a) code will not compile at runtime : b) the code will give runtime errors . Now when I know that the code is erroneous & will not work , how do I differentiate between these 2 options, that is what sort of errors are caught at compile time & what sort of errors is the responsibility of the runtime environment(JVM) . Please can someone explain .
Thanks in advance.
Regards,
Kaushik

Hello Kaushik,
Compile errors have to do mostly with syntactical and rules of the language. In addition to that, if the complier is smart, it will also catch obvious errors in program logic or potential boundary and mathematical violations. Compile errors will prevent you from generating class files or executable units.
Once your program is free from compilation errors, it might or might not generate any error. An error caught by JVM during program execution is a runtime error.
Regards,
Lam

denish mehta
Ranch Hand

Joined: Dec 21, 2000
Posts: 135
Hi
I think JLS will solve the problem. I don't remember which chapter but i think 15 is the one
regards
Denish
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Runtime & Compile Time Errors . PLS HELP !!!!!