my dog learned polymorphism*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 9994
    
    7

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
 
Similar Threads
Very new to java
GuessGame Errors From Head First Java
Please Help with Guessing Game (Head First Java)
GuessGame errors
Head First Java Book, Chapter 2