Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    1,494

    Re: Java while loops and switches

    @D.K Did you test that code? How many times did the execute the statement in loop?



    You should ALWAYs use the default to catch unexpected input.
  2. Replies
    9
    Views
    1,494

    Re: Java while loops and switches

    Please edit your post and wrap your code with code tags:


    YOUR CODE HERE

    to get highlighting and preserve formatting.

    The code needs to test that the user has entered a valid response....
  3. Replies
    9
    Views
    1,494

    Re: Java while loops and switches

    Take a look at the tutorial on while loops:
    The while and do-while Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
Results 1 to 3 of 3