• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Is this an errata? (Sybex OCA Study Guide)

 
Ranch Hand
Posts: 117
11
Hibernate Netbeans IDE Eclipse IDE Postgres Database Tomcat Server Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.




 
Sheriff
Posts: 9008
652
Mac OS X Spring VI Editor BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4905
60
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9008
652
Mac OS X Spring VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 42109
934
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic