Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

simple instantiation from Mughal book  RSS feed

 
Jarrod Legion
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
The code below contains two classes, and an inerface. In class Planet, shouldn't the Star object orbiting be instantiated before it can use the method describe()? Without instantiating the Star class it compiles, but gives a NullpointerException, as it should, during execution. Can someone please tell me if I am right?
Mughal keeps a nice Errata page, but this isn't on it, so I am curious as why it isn't.


TIA,
-Jarrod
 
Yosi Hendarsjah
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!