The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Just a word of advice, you should probably reduce your WHILEs to a minimum... since the higher the number of loops is the more complex your algorithm is. As for the ending problem, whenever you want to check if two strings you need to use the equals methods, == will only check if the objects' reference is the same. So in your case you'd have name.toLowerCase().equals("stop") or name.equalsIgnoreCase("stop'')

Re: program loops never ending

ok i agree with the previous posts with getting rid of the while statements.

but as is, i found your error...

while loop while(number1<0)// there needs to be a { here, otherwise only the next line is associated with the while loopSystem.out.print("Enter hourly rate:");
number1 = input.nextDouble();// and here needs to be the } so the program knows that this is the intended stop point

so basically when the program reads that number1<0 it then goes on to read the System.out.print line, and since there is no brackets the program assumes that is the only line you want to associate with the while loop therefore the next line is never reached and you have created a forever loop