This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    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
Pie
Posts: 49733
69
  • 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
Pie
Posts: 49733
69
  • 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
Pie
Posts: 49733
69
  • 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