aspose file tools*
The moose likes Beginning Java and the fly likes Help needen with  Pool Puzzle excercise on page 91 Head First book...pleaseee Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help needen with  Pool Puzzle excercise on page 91 Head First book...pleaseee" Watch "Help needen with  Pool Puzzle excercise on page 91 Head First book...pleaseee" New topic
Author

Help needen with Pool Puzzle excercise on page 91 Head First book...pleaseee

Krisztina Tarko
Greenhorn

Joined: Jun 11, 2009
Posts: 3
Hi..

I am struggling since more than 1 hour on finding where the mistakes lies in my code from the Puzzle Exercise ..

Here is how I solved the exercise:

And even though i really CAN'T see any difference from the given solution in the book..i get the following error:

Can someone see where i'm wrong..you know how they say: another pair of eyes always help
Many many thanks
Kris.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
I'd take Puzzle4b out of the Puzzle4 class. Make it a stand-alone class. Otherwise you'll need to do funny and ugly constructs like this one:


One other option is to make Puzzle4b a static inner class:
Krisztina Tarko
Greenhorn

Joined: Jun 11, 2009
Posts: 3
Yeah..that was it... i had the feeling that at this level it works to have them all in one..My mistake!!

Thanks a lot!

A good day!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19544
    
  16

Next time, check out the compiler errors (and to a lesser extent its warnings) before running your code.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Krisztina Tarko
Greenhorn

Joined: Jun 11, 2009
Posts: 3
Yes I know..it was a stupid mistake ..and sorry for takin your time with it..i just was stuck. But learned a good lesson!
again: Thanks a lot for your quick reply!

I promiss I won't be bothering again with such obvious things
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help needen with Pool Puzzle excercise on page 91 Head First book...pleaseee
 
Similar Threads
Head first programme
Head first java exercise JVM problem
Head First Java - Chapter 4 puzzle question
Head first Java - Chapter 4 Pool Puzzle p.91
Head First page 92 Pool Puzzle