wood burning stoves
The moose likes Java in General and the fly likes Problem with pool puzzle! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with pool puzzle!" Watch "Problem with pool puzzle!" New topic
Author

Problem with pool puzzle!

Arun C. Giridharan
Ranch Hand

Joined: Jul 11, 2010
Posts: 96
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 ....??
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44472
    
  34
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.
Nabanita Sarkar
Greenhorn

Joined: Aug 11, 2015
Posts: 22
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
Sheriff

Joined: Oct 13, 2005
Posts: 44472
    
  34
No, there is nothing wrong with the puzzles. Please tell us the page number and what you are getting wrong.
Nabanita Sarkar
Greenhorn

Joined: Aug 11, 2015
Posts: 22
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
Sheriff

Joined: Oct 13, 2005
Posts: 44472
    
  34
In which case there will be two pieces of code which include x < 1.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with pool puzzle!
 
jQuery in Action, 3rd edition