Bookmark Topic Watch Topic
  • New Topic

nit w/ chap.6 q.13 S&B

 
Steven Elliott
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sierra & Bates SCJP 6 chap. 6, question 13 is:

One of the correct answers is:
G. The invocation of parse() must be placed within a try/catch block

My nit is you can declare to throw an Exception in the main method so "...must be placed within a try/catch block." is not true because it is not the only option.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
What are the other ”correct‟ answers?
 
Steven Elliott
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
The other two are:

B. The output is 987.12346 987.12345
F. The code compiles and runs without exception

I mistakenly posted this here and have reposted to the Programmer Certification (SCJP/OCPJP) forum where I had originally intended. The entire question and answers are posted there.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
Steven Elliott wrote: . . . have reposted to the Programmer Certification (SCJP/OCPJP) . . .
You ought not do that, for reasons explained here; you ought to have asked me to move the question.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
Since the other thread has an answer, I shall close this thread.
 
    Bookmark Topic Watch Topic
  • New Topic