aspose file tools*
The moose likes Beginning Java and the fly likes Head First Java: Guessing Game infinite look Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Head First Java: Guessing Game infinite look" Watch "Head First Java: Guessing Game infinite look" New topic
Author

Head First Java: Guessing Game infinite look

Ivan Akunenko
Greenhorn

Joined: Sep 08, 2011
Posts: 6
I am trying to run the Guessing Game code from Head First Java and run into an infinite loop.

Here is the code:



And here is the output I get:



Pretty confused where the problem is.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10384
    
    8

Welcome to the Ranch.
Pretty confused where the problem is.

while (true) Smell something fishy here?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Daniel Vlad
Greenhorn

Joined: Aug 07, 2011
Posts: 29
Try and take a better look at your if statements, you will notice you missed something
Ivan Akunenko
Greenhorn

Joined: Sep 08, 2011
Posts: 6
Ok, got it. Missed a break. Thanks everyone.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First Java: Guessing Game infinite look