Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Java program? (https://www.askmehelpdesk.com/showthread.php?t=320124)

  • Feb 21, 2009, 06:05 AM
    nofear13
    java program?
    we have an assignment!
    but hold up!
    I would only ask what is the name of this code if I have fill up the blanks!
    code:
    puclic class problim{
    public static void main(String[]arg){
    int x=___;
    int y=___;
    while;(__<s){
    x=____;
    y=____;
    system.out.print(_+_+_+_);
    x=_+_;
    }
    }
    }

    is it a while loop or do while? Or if-else? What ? If I had fill it up?. :confused:
    thanks for your time...
  • Feb 21, 2009, 06:18 AM
    Perito
    Quote:

    Originally Posted by nofear13 View Post

    while;(__<s){
    x=____;
    y=____;
    system.out.print(_+_+_+_);
    x=_+_;
    }

    is it a while loop or do while? or if-else? what ? if i had fill it up?...:confused:
    thanks for your time...

    That is a "while loop". The condition is evaluated at the beginning of each loop.

    Is there really a ";" after the "while"? There shouldn't be.
  • Apr 20, 2010, 01:50 PM
    Fowl05

    Perito is correct, also a do... while loop would have a do.

  • All times are GMT -7. The time now is 06:51 AM.