The program is a expense tracker and needs to be error free. To accomplish that goal I need to restart everything from line 11 and further.
public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int Size;
    int order;
    System.out.println("Put in the amount of expenses you have");
    Size = sc.nextInt();
    System.out.println("put in all your expenses");
    int userInput[] = new int[Size];
    for (int i = 0; i < userInput.length; i++)
        userInput[i] = sc.nextInt();
    System.out
            .println("do you want it ascending or descending order. If you want it in ascending press 1 or if you want descending press 2");
    order = sc.nextInt();
    System.out.print("expenses not sorted : ");
    printExpenses(userInput);
    if (order == 1) {
        expensesAscending(userInput);
    } else if (order == 2) {
        expensedescending(userInput);
    }else if (order>2){
        //How do i make it so that if they press three or above the program restarts
    }
}
 
     
    