File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Not compiling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Not compiling" Watch "Not compiling" New topic
Author

Not compiling

shabbir ali
Greenhorn

Joined: Sep 02, 2006
Posts: 16
HI can anybody tell me y this code is not compiling while it is given in cathy seirra and bates book "scjp study guide"...(page no 25)



Thank you......


[HENRY: Added code tags, and formatted code]
[ September 02, 2006: Message edited by: Henry Wong ]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

The code looks fine to me. Could you provide us with the error messages that you are getting when you compile it.

Of course, since there isn't a main() method, you can't actually run the code... but it should compile.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
What compiler errors are you getting? Compiles and runs (when an instance of Moo is created and the method useAZoo is called). Like Henry says, there is nothing obviously wrong.
[ September 02, 2006: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not compiling