Search:

Type: Posts; User: D.K

Search: Search took 0.07 seconds.

  1. Replies
    9
    Views
    1,500

    Re: Java while loops and switches

    Opps, forgot that was an infinite loop XD.

    Edit: if you add num++; in the while loop that will fix the infinite loop (increments num by 1 each time).
  2. Replies
    9
    Views
    1,500

    Re: Java while loops and switches

    while (condition) {
    statement;
    }


    Basically if the condition is true then the statements are executed until the condition becomes false.

    Example:
Results 1 to 2 of 2