This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with pool puzzle!

 
Arun C. Giridharan
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • 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 ....??
 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • 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.
 
Nabanita Sarkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In which case there will be two pieces of code which include x < 1.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic