This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • 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
Sheriff
Posts: 36406
454
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!