This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Some minor typos about chapter 3 (Java OCA 8 Programmer I Study Guide)  RSS feed

 
Ranch Hand
Posts: 206
27
Java jQuery Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. On page 136, Autoboxing, last paragraph, 1st sentence:
Everything is clear in this explanation but maybe “outputs 1” should be “outputs [1]”.


2. On page 141, in the last example:
Semicolon is missing after statement

3. On page 148, the third example, 1st line:
There is no any typo, everything is ok. But I guess that authors intend to declare variable name as shortDate instead of shortDateTime. Because formatting is regarding only date.


4. On page 340, mock explanation #4:
“At this point sb contains abbbaa”abbbaa should be abbaa.

The same question in online material:
abbbaa and abbbaccca should be abbaa and abbaccca in explanation respectively. Option B was already noted in errata list.


 
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

Mushfiq Mammadov wrote:1. On page 136, Autoboxing, last paragraph, 1st sentence:
Everything is clear in this explanation but maybe “outputs 1” should be “outputs [1]”.


Correct! The output of that code snippet is [1].

Mushfiq Mammadov wrote:2. On page 141, in the last example:


Indeed! Semicolon should be added.

Mushfiq Mammadov wrote:3. On page 148, the third example, 1st line:
There is no any typo, everything is ok. But I guess that authors intend to declare variable name as shortDate instead of shortDateTime. Because formatting is regarding only date.


Although nothing wrong with both code snippets, but probably shortDate is a slightly better variable name.


Mushfiq Mammadov wrote:4. On page 340, mock explanation #4:
“At this point sb contains abbbaa”abbbaa should be abbaa.


Well spotted! We have an empty StringBuilder and we append three a's and insert only two b's => after the first two method invocations, sb contains abbaa (almost a very famous Swedish pop group ).

Hope it helps!
Kind regards,
Roel
 
author & internet detective
Marshal
Posts: 38508
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Logged #1, 2 and 4 in the errata.

For #3, the variable name has dateTime because the class is DateTimeFormatter. The "short" in the name was intended to convey that it is a short format that just has the date.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!