• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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
  • 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: 7619
522
Mac OS X VI Editor BSD Linux
  • 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
Posts: 4428
41
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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: 7619
522
Mac OS X VI Editor BSD Linux
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
Posts: 39997
807
Eclipse IDE VI Editor Java
  • 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!
 
You have to be odd to be #1 - Seuss. An odd little ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic