This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Errata Assessment Test MQ 3 (Java OCP 8 Programmer II Study Guide, Sybex)  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

thank you for writing the book, and for adding me in the acknowledgements ;)

I found a minor bug in the mock questions of the Assessment Test at page xxxix.
It is about Mock question 3 (What is the result of executing the following code?)

Well, the result is, that the code cannot be executed, because the main-method is missing the static keyword ;)

the signature of the main method in the book is:

it is missing a static keyword. It should look this one:




 
Sheriff
Posts: 11338
178
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dominik Bauer wrote:Well, the result is, that the code cannot be executed, because the main-method is missing the static keyword ;)


Agreed! Well spotted!

PS. You have created a topic in the OCAJP forum which is not the most appropriate forum to post errata about the Java OCP 8 Programmer II Study Guide. You should use the OCPJP forum instead. I have already moved your topic to this forum (for your convenience).
 
Dominik Bauer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

sorry for choosing the wrong forum. The next one will be in the appropriate one.
 
Roel De Nijs
Sheriff
Posts: 11338
178
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dominik Bauer wrote:The next one will be in the appropriate one.


 
author & internet detective
Posts: 39129
723
Eclipse IDE Java VI Editor
 
Greenhorn
Posts: 4
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I hope it's ok to use this thread since I found another mistake in question 3 of the assessement test. Imho, and IntelliJ's and that of javac, the code does not compile because of line 2. Based on the assumption that the code is saved in a file named Bird.java (since the main method is in the Bird class) the compiler throws an error on line 2:


That is, of course, true since it is not allowed to have two public classes in one file (according to the line numbers the code obviously is meant to be in the same file). Since there is no appropriate answer I guess the public access modifier should be removed from class Tail.
 
Jeanne Boyarsky
author & internet detective
Posts: 39129
723
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kilian,
Welcome to CodeRanch! It's fine to use this thread.

You are correct that there shouldn't be two classes with a public modifier. I'm not adding it to the errata since technically it isn't one. (The question doesn't say that only the lines mentioned have compiler errors). Clearly this isn't the intent though so I adde dit to our private list of things to fix in a OCP 9 book.

Have a cow for pointing this out!
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!