• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Errors in OCP 1Z0-815 Wiley Test Banks Bonus Exam 1

 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hope this is the right forum for these remarks!

I've just taken the first bonus exam from the OCP Java SE 11 Programmer 1 book, and I've noticed a few errors in the questions. The first is question 6, which states that answers A and C are correct. However, a Set only has 1 generic type parameter, so Set<Boolean,Character> cannot be a correct answer.

The second is question 71, which states that a package must always come first in a Java file, making option B incorrect. However, my compiler says that the following is perfectly valid Java:



The third is question 75, which has two correct answers but only allows me to select one.

Hope this helps,

Jeroen

Selection_050.png
[Thumbnail for Selection_050.png]
Question 6
Selection_051.png
[Thumbnail for Selection_051.png]
Question 71
Selection_052.png
[Thumbnail for Selection_052.png]
Question 75
 
Marshal
Posts: 78406
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Jeroen Steenbeeke wrote:. . . question 71 . . . states that a package must always come first in a Java file, making option B incorrect. . . .

B allows you to put the line with the /* comment */ first. Since comments are ignored by the compiler, yes, you are correct: option B is right.
No, Set<Boolean, Character> looks incorrect, assuming that Set means the same as this type. I think you are correct there.
I am not quite sure about Q75; the primitive types are not “small” and “large”, but “narrow” and “wide”. Yes, float→double is arranged in order from narrow to wide. The question does have B, F as its solution, so the error is not in how it is written, but how it was programmed into the website.
 
author & internet detective
Posts: 41763
885
Eclipse IDE VI Editor Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeroen,
Welcome to CodeRanch!

I've added the first two the errata list. For the third, it was right in the version we submitted. We even used the metadata so it would show up as a checkbox. I'm working with the publisher on what happened in between.
 
reply
    Bookmark Topic Watch Topic
  • New Topic