Results 1 to 6 of 6

Thread: while loop

  1. #1
    michcio is offline Member
    Join Date
    Nov 2007
    Posts
    22
    Rep Power
    0

    Default while loop

    how do I return to the beginning of the while loop...which command shall I use...


    while(something){
    .
    .
    .
    .
    return???!!! //which command to get to the top of the while loop?!
    .
    .
    }

    help please:confused:
    michcio

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Michcio - please get a book on learning the Java language. Your question is a fundamental one. If you cannot for whatever reason get a book, then read the online Sun tutorials, which is safe to say is the official tutorial on the language.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  3. #3
    michcio is offline Member
    Join Date
    Nov 2007
    Posts
    22
    Rep Power
    0

    Default

    hum I have already a book but haven't found anything about how to return in the while loop and neither on the net and that was the reason of why I wrote here :O

  4. #4
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    I find it hard to believe your book doesn't have a section on while loops. What book are you using? Look up control and flow statements or use the index and search up the while keyword.

    EDIT: your answer is in the Sun Tutorials under this section. You didn't look hard enough.
    Last edited by CaptainMorgan; 01-27-2008 at 12:53 AM.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  5. #5
    michcio is offline Member
    Join Date
    Nov 2007
    Posts
    22
    Rep Power
    0

    Default

    Quote Originally Posted by CaptainMorgan View Post
    I find it hard to believe your book doesn't have a section on while loops.
    well, ofcource it has a section on while loops but there is nothing about how to return to the begining of a while loop...and can't you just tell me if you know it will go much faster for me..please :)

  6. #6
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Quote Originally Posted by michcio View Post
    well, ofcource it has a section on while loops but there is nothing about how to return to the begining of a while loop...and can't you just tell me if you know it will go much faster for me..please :)
    No. If you are given the answer - that is not learning. As I said previously - your question is a fundamental one. It's not that you don't know it, it's worse- you don't want to learn it, in that case you might want to pick a new hobby.

    See my previous post for an updated edit.
    Last edited by CaptainMorgan; 01-27-2008 at 12:59 AM.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Similar Threads

  1. Loop Help
    By HeavyD in forum New To Java
    Replies: 7
    Last Post: 09-22-2010, 09:55 PM
  2. do...while loop
    By eva in forum New To Java
    Replies: 16
    Last Post: 01-31-2008, 06:44 AM
  3. 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
  4. A loop that doesn't loop
    By MichYer in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 08:44 AM
  5. While loop
    By leebee in forum New To Java
    Replies: 1
    Last Post: 07-18-2007, 03:11 PM

Posting Permissions

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