Errata

Head First Java

Errata for Head First Java

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 88
Exercise B

class Clock {
String time; <-- Isn't it better to mark the instance variable private?

setTime()...
getTime()...
...

Anonymous  Aug 31, 2015 
Printed Page 412
3rd Rule Example Code

The method declaration does not match the EJB-QL example.
Either change:

WHERE m.genre = ?2 AND m.director.degrees < ?1
... to:
WHERE m.genre = ?2 AND m.director.directorId < ?1

Or change:

public String ejbHomeListMoviesByDirectorAndGenre(String dirID, String genre)
... to:
public String ejbHomeListMoviesByDirectorAndGenre(String degrees, String genre)

Basically, argument 1 in the EJB-QL implies Director.degrees, whereas argument 1 in
the method implies Director.directorId

Anonymous   
Printed Page 467
.

Current Content: A side note which reads:
"Now we actually do the writing. Remember, the writer is chained to the *input stream* from the Socket ....".
Correct: I think it should be *output stream* from the Socket instead of input stream.

Anonymous  Dec 20, 2011