This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Not compiling" Watch "Not compiling" New topic

Not compiling

shabbir ali

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

Joined: Sep 28, 2004
Posts: 20374

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.


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:
subject: Not compiling
It's not a secret anymore!