This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiles / Compiles but generate error??

 
swati bannore
Ranch Hand
Posts: 201
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Guoqiao Sun
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Aakanksha
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Guoqiao is right. If it generates a compile-time error then obviously it does not compile.
 
swati bannore
Ranch Hand
Posts: 201
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic