• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error on p8? (Sybex)  RSS feed

 
Wim Jansen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I came across an error on p8, chapter 1;
In the middle of the page it says: "Line 29 returns false because the nullHipp variable reference points to null and null is not a Hippo."
I think it should be: "Line 29 returns false because the nullHipp variable reference points to null and null is not an Object."
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36666
475
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wim,
Welcome to CodeRanch! I edited your post to put the publisher in the subject so people know what book this is about.

Both of the statements you made are factually correct. null is not a Hippo or an Object. Because Hippo is a type of Object, both are true. We chose to remark on the Hippo because the variable suggests it might be a Hippo.

So it isn't an error in the book, but you aren't wrong either!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!