This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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: 67533
257
  • Mark post as helpful
  • send pies
  • 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: 39790
797
Eclipse IDE VI Editor Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • 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.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!