File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple instantiation from Mughal book

 
Jarrod Legion
Greenhorn
Posts: 18
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic