Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Headfirst Java Exercise  RSS feed

 
Heidi Atwood
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been working my way through Headfirst Into Java and got to the puzzle in Chapter Five and got stumped. I changed the variable names to something less confusing and I can follow most of the code, but I don't understand where in the PuzzleTest class that the int variable factor gets made equal to a number that can be used to complete the calculation. I know I'm pushing the "no question to small" envelope but I've been staring at it since last night and would appreciate any pointers? Thanks for any help! Here is the main class (and yes, I know I renamed them backwards with the main being Puzzle and the method class being PuzzleTest)...



And here is the method class...



Heidi
 
Heidi Atwood
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ACK! Never mind - just discovered this has already been asked about ten times. Sorry!
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heidi Atwood wrote:ACK! Never mind - just discovered this has already been asked about ten times. Sorry!
No problem. We have far more people asking with i = i++; doesn’t increment i.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!