How can i get it when the user inputs the wrong number it restarts the process?
package me.aaron.myfirstproject; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); System.out.println("Enter a number between 1 and 10\nMake sure it is actually between 1 and 10"); int num1 = scan.nextInt(); if (num1 > 10){ System.out.println("That is not between 1 and 10!"); } System.out.println("Enter a second number between 10 and 15"); int num2 = scan.nextInt(); if ((num2 < 10) && (num2 > 15)){ System.out.println("That number is not between 10 and 15!"); } int num3 = num1 + num2; System.out.println("The sum of those numbers is " + num3); } }