Results 1 to 2 of 2
  1. #1
    meee is offline Member
    Join Date
    Sep 2009
    Posts
    1
    Rep Power
    0

    Question Which loop to use?

    Hi there,

    I am new to using java and need some help choosing the correct or most appropriate loop for the situation.

    I need a loop which allows me to: ask the user a question, check if their initial response matches the word that i am using to let them continue and start the loop(otherwise the program stops when using other responses), execute some code and then ask them again if they want do it all again using the key word to continue or any other words to stop etc.

    I don't want to use numbers to control the loop which seems common, but does not suit me.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

Similar Threads

  1. while-loop stopping on first loop
    By davester in forum New To Java
    Replies: 6
    Last Post: 06-26-2009, 08:46 PM
  2. Help w/ loop
    By iWonder in forum New To Java
    Replies: 17
    Last Post: 11-20-2008, 12:39 AM
  3. While loop
    By sjhentges in forum New To Java
    Replies: 11
    Last Post: 11-04-2008, 04:26 PM
  4. For Loop
    By kian_hong2000 in forum New To Java
    Replies: 1
    Last Post: 08-07-2008, 02:01 PM
  5. can you help me with this for loop?
    By java_fun2007 in forum New To Java
    Replies: 6
    Last Post: 12-22-2007, 10:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •