• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this an errata? (Sybex OCA Study Guide)  RSS feed

 
João Victor Gomes
Ranch Hand
Posts: 113
11
Eclipse IDE Java Netbeans IDE Postgres Database Tomcat Server
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again, and sorry bothering you one more time.

As I said in another topic, I just finished the first mock exam of Sybex online tool (from the OCA Study Guide), and in question 37, I believe there is a mistake in the answer explanation.
The correct answer is letter C, because a primitive variable can't call methods, so the code won't compile. But then, the explanation says "Although Shark does compile, it does not have a main() method and will...". But the class doesn't compile because of the numFins.toString(), and then the explanation says that it does compile.
I believe this isn't right. I've already searched in the official errata, and didn't find anything about it.




 
Liutauras Vilda
Sheriff
Posts: 4923
334
BSD
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see what you mean, but I don't think explanation is wrong.

Authors I think imply that class would compile having method Main() instead main() assuming that other lines are valid.
That sentence in particular explaining Main() and main() differences. Don't look at a whole context of this code snippet, look to its distinctive parts.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 4116
34
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although it is easy to understand what was the intention behind the statement, "Although Shark does compile...", IMHO, it is incorrect and misleading because Shark does not compile.
 
Roel De Nijs
Sheriff
Posts: 11338
177
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Liutauras Vilda wrote:I see what you mean, but I don't think explanation is wrong.

The explanation is wrong as it is crystal-clear that class Shark does not compile (totherwise answer C would have been the wrong answer). The correct statement for the explanation would have been: "If Shark would have compiled,..."
 
Liutauras Vilda
Sheriff
Posts: 4923
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We know it doesn't compile, what I was saying were only my thoughts what authors might tried to imply. So, I don't think authors were trying to explain it wrongly, they just made some implications in my understanding. But if user got some uncertainty in that - clarification would do no harm.
 
Roel De Nijs
Sheriff
Posts: 11338
177
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Liutauras Vilda wrote:So, I don't think authors were trying to explain it wrongly

Obviously! But that doesn't make that statement a correct one.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37496
548
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Confirmed this is an errata and added it to our list. Thanks!

The correct verbiage should be "Even if Shark compiled". That was meant to be a note about Main not being right. I concur that Shark doesn't compile!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!