Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
What are the other ”correct‟ answers?
 
Steven Elliott
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Since the other thread has an answer, I shall close this thread.
 
    Bookmark Topic Watch Topic
  • New Topic