Java how to loop help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dudilydude
    New Member
    • Mar 2006
    • 1

    #1

    Java how to loop help

    Yo.

    Need a little help.

    How do i loop an area of code with a switch statement, it asks the user for a value and returns a statement once and i wanna do it 3 times.

    Any help and i'll marry you!

    :confused:
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Put it all in a for loop

    for (int x = 0; x < 3; x++)
    {
    /* Your code here */
    }

    Comment

    Working...