I was wondering how I could make this code for rock paper scissors repeat itself 10x
import java.util.Scanner; import java.util.Random; public class Rock { public static void main (String [] args) { int scissor = 0; int rock = 1; int paper = 2; Random random = new Random(); int computerNumber = random.nextInt(3); Scanner input = new Scanner (System.in); System.out.println (" Please enter a number 0, 1, or 2."); int userNumber = input.nextInt(); if (userNumber > 2) { System.out.println("Incorrect value entered"); } System.out.println("Computer Value:" + computerNumber); if (userNumber == computerNumber) { System.out.println("Its a draw"); return; } if (userNumber == scissor) { if (computerNumber == paper) { System.out.println("User wins!"); return; } else if (computerNumber == rock) { System.out.println ("Computer wins!"); return; } main(null); } else if (userNumber == rock) { if (computerNumber == paper) { System.out.println("Computer wins!"); return; } else if (computerNumber == scissor) { System.out.println("User wins!"); return; } } else if (userNumber == paper) { if (computerNumber == scissor) { System.out.println("Computer wins!"); return; } else if (computerNumber == rock) { System.out.println("User wins!"); return; } } else { System.out.println("User wins!"); return; } } }