• Post Reply 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

Multiple errors - Choose both?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I took the mock exam C from the book (The one, that you have to download)

Given that compilation fails due to multiple errors. Which of the following answer would you choose:

"A Compilation fails due to a single error in the code."
"B Compilation fails due to multiple errors in the code."

I've chosen B, but the solution says A & B.

Now I'm wondering what I will have to choose tomorrow, when I've got the real exam.

Thanks and best regards
Lukas
 
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please give complete description of question source and complete question so we can analyse the problem

Regards
Ninad
 
Lukas Jenny
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your time and answer. Sorry, I thought this is not necessary for my question. Her it is:

SCJP Sun Certified Programmer for JavaTM 6 Study Guide (Exam 310-065)
Quiz C for SCJP Sun Certified Programmer for JavaTM 6 Study Guide (Exam 310-065)

Question
Given:

Which are true? (Choose all that apply.)
Correct Answer
B: Compilation fails due to a single error in the code.
C: Compilation fails due to multiple errors in the code.
E: By default, the readPassword() method echos the users keystokes.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lukas Jenny:
...
"A Compilation fails due to a single error in the code."
"B Compilation fails due to multiple errors in the code."

I've chosen B, but the solution says A & B...


That looks like an error in the mock exam.

If there are multiple errors, then you should choose the answer "fails due to multiple errors."
 
Lukas Jenny
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lukas Jenny:
I took the mock exam C from the book (The one, that you have to download)
...
SCJP Sun Certified Programmer for JavaTM 6 Study Guide (Exam 310-065)
Quiz C for SCJP Sun Certified Programmer for JavaTM 6 Study Guide (Exam 310-065)


I hope that you don't mean that the SCJP Study Guide is "the book that you have to download".

Buy the book in a bookstore. The book is not legally available for free on Internet. If you downloaded it for free, you are using an illegal copy.
 
Lukas Jenny
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for the uncleanness, I meant the additional MasterExam that comes with the book...
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't E as a correct answer also be an error in the mock exam? readPassword() does not echo by default. I think the correct answers should be: C, D
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As always, it's possible that there is an error in the book, but before coming to that conclusion I would ask the the *complete* question and answer be posted here - word for word. Sometimes the wording of mock questions is very precise.

Thanks!

Bert
 
Bert Bates
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lukas,

I received a screen shot in my mail for this question. You're right, there is an error with this question!

Thanks for spotting it, I'll update the errata list.

Bert
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently ran into this MasterExam question error. I just downloaded the bonus practice exam within the last month so I'm surprised to see such a blatant error still hasn't been corrected.

Also, did I miss it, or is there still no official errata list?

So far the best I found was the topic here: https://coderanch.com/t/467890/java-programmer-SCJP/certification/Compiling-errata-SCJP
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ryan Slominski wrote:I recently ran into this MasterExam question error. I just downloaded the bonus practice exam within the last month so I'm surprised to see such a blatant error still hasn't been corrected.

Also, did I miss it, or is there still no official errata list?

So far the best I found was the topic here: https://coderanch.com/t/467890/java-programmer-SCJP/certification/Compiling-errata-SCJP



One can only conclude that it simply isn't considered very important.
 
Ranch Hand
Posts: 211
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Can someone explain why multiple errors.......i think there is only one error where readLine() is invoked......Why multiple errors ??
....And what about the E option doesnt readPassword () echoes the user's keystrokes ??.....please can someone explain ??
 
Ryan Slominski
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dennis Deems wrote:One can only conclude that it simply isn't considered very important.



Really? On a Java community forum focused on certification you think the practice test quality isn't something to take seriously?

sagar shroff wrote:Hey Can someone explain why multiple errors.



The first error is because the method System.getConsole doesn't exist. It should be System.console(); The second error is that Console.readLine returns a String, not a char[].
 
Sagar Shroff
Ranch Hand
Posts: 211
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what about the E option doesnt readPassword () echoes the user's keystrokes ??.....please can someone explain ??

And if it doesnt do echoes by default which method should we invoke in order to echo the password ??
 
Ryan Slominski
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just look at the JavaDoc API: http://download.oracle.com/javase/6/docs/api/java/io/Console.html

You'll see that if you use the readPassword method that the user's keystrokes are not echoed. If you wanted to echo the user's keystrokes you could use the readLine method instead (which means you would also get a String, not a char[]).
 
Sagar Shroff
Ranch Hand
Posts: 211
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ryan Slominski wrote:Just look at the JavaDoc API: http://download.oracle.com/javase/6/docs/api/java/io/Console.html

You'll see that if you use the readPassword method that the user's keystrokes are not echoed. If you wanted to echo the user's keystrokes you could use the readLine method instead (which means you would also get a String, not a char[]).




Thanks !!
 
dennis deems
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ryan Slominski wrote:
Really? On a Java community forum focused on certification you think the practice test quality isn't something to take seriously?



No, that is not at all what I wrote. I wrote this:

Dennis Deems wrote:One can only conclude that it simply isn't considered very important.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic