• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with pool puzzle!

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm really not comfort with pool puzzle ....... i just take 2 hours or Minimum 1 hour it's hopeless... it increases as chapter increases ...right Now i'm in Exception handling in Head First Java ...is there any trick to solve these things ....??
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They should be reasonably easy if you actually understand the logic behind them. Go back and read the chapter again and copy out the code and run it. Then you might understand better.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:They should be reasonably easy if you actually understand the logic behind them. Go back and read the chapter again and copy out the code and run it. Then you might understand better.



It is mentioned in the book that "Each snippet should be used only once..but they used x<1 twice in that program.Even i need to use one condition atleast twice to solve...so the problem itself is wrong
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, there is nothing wrong with the puzzles. Please tell us the page number and what you are getting wrong.
 
Nabanita Sarkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:No, there is nothing wrong with the puzzles. Please tell us the page number and what you are getting wrong.




Page no 24,chapter 1 Head First java..Check the note:
Note:
Each snippet from the pool can be used only once.

But in Ans they used x<1 condition twice ..
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In which case there will be two pieces of code which include x < 1.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic