The compiler (1.4) gives error at line 1 only. Line 2 & 3 are ignored. However, if you resolve line 1 error, 2 & 3 are reported. Any reasons for that behavoir? Thanks Barkat
Sugata B.
Greenhorn
Joined: Sep 29, 2003
Posts: 2
posted
0
B'coz Java is an interpreted language.
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
posted
0
If there's more than one error possible, the compiler isn't required to report them all. Compilaion is a multi-pass process, and generally the compiler will report all errors it finds in a given pass, but then it will stop. So it tends to find all errors of a given general "type", but ignore the more complex stuff it hasn't gotten around to understanding yet. Which things it reports and which it does not is a complex thing to determine, but it's not one you need to worry about for SCJP. If the compiler could report a given error (assuming no other errors cause compilation to complete prematurely), that's all you really need to know.
"I'm not back." - Bill Harding, Twister
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: compiler some times does NOT report all errors