• 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
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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

 
Ranch Hand
Posts: 116
11
Eclipse IDE Hibernate 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.




 
Marshal
Posts: 6106
418
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.
 
Enthuware Software Support
Rancher
Posts: 4211
35
  • 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.
 
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
Marshal
Posts: 6106
418
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.
 
author & internet detective
Marshal
Posts: 38681
677
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!