This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Compiles / Compiles  but generate error?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Compiles / Compiles  but generate error??" Watch "Compiles / Compiles  but generate error??" New topic
Author

Compiles / Compiles but generate error??

swati bannore
Ranch Hand

Joined: Oct 18, 2000
Posts: 201
In the following code,the code generates compile time error as instance variable age is not initiazed.

Options are -
1)Compiles and runs with no output
2)Compiles and runs printing out The age is 1
3)Compiles but generates a runtime error
4)Does not compile
5)Compiles but generates a compile time error
Whats the difference in the options 4 and 5 .
Doesn't it mean that,When compiler error occurs,the code has not compiled..??
Thanx


Swati Kale
SCJP
SCWCD
Guoqiao Sun
Ranch Hand

Joined: Jul 18, 2001
Posts: 317
I think option 5 is a wording error, it should be:
<code>
5)Compiles but generates a runtime error
</code>
Rgds,
Guoqiao
[This message has been edited by Guoqiao Sun (edited July 18, 2001).]


Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Aakanksha
Ranch Hand

Joined: Jul 17, 2001
Posts: 60
I think Guoqiao is right. If it generates a compile-time error then obviously it does not compile.
swati bannore
Ranch Hand

Joined: Oct 18, 2000
Posts: 201
Aakanksha,
Even I think that way .But these r the wordings.And it is from John Hunt's mock exam at
http://www.jaydeetechnology.co.uk/certification.htm
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Just a suggestion. Be VERY careful when taking any mock exams and relying on any answers to the questions provided. I have read quite a few very poorly worded questions. Hopefully one can assume that the official programmer exam is written in proper English, but do not assume under any circumstance that the mock exams are written correctly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiles / Compiles but generate error??
 
Similar Threads
difference btwn "does not compile" and "complie time error"
"does not compile" vs "compile time error"
ambiguous statement
Can't understand such an output..
Does not compile vs Compiles with Error? (John Hunt Mock Exam)