I visited other questions similar to mine but did not find the one that is applicable to me.

To lessen my line of codes instead of copy pasting that input process to my if else statement. I created a `UInputs();` method that will get user inputs. So I can just call it whenever it is needed but i cant use the user inputted values inside `UInputs()`.

```
import java.util.Scanner;

public class Calculator {
    public static void UInputs(){
        double num1, num2, num3, num4, num5;
        Scanner scan = new Scanner(System.in);
        System.out.print("1st Number: ");
        num1 = scan.nextDouble();
        System.out.print("2nd Number: ");
        num2 = scan.nextDouble();
        System.out.print("3rd Number: ");
        num3 = scan.nextDouble();
        System.out.print("4th Number: ");
        num4 = scan.nextDouble();
        System.out.print("5th Number: ");
        num5 = scan.nextDouble();
    }

    public static void main (String[] args){
    char Choice;
    double num1, num2, num3, num4, num5;

    System.out.println("\t_________________________________\n");
    System.out.println("\t|\tMATH OPERATIONS\t\t|\n\t|\t[+]\tAddition\t|\n\t|\t[-]\tSubtraction\t|\n\t|\t[*]\tMultiplication\t|\n\t|\t[/]\tDivision\t|\n");
    System.out.println("\t|_______________________________|\n");
    System.out.print("\nEnter you Choice: ");
    Scanner scan = new Scanner(System.in);
    Choice = scan.nextLine().charAt(0);

    if ( Choice == '+') {//ADDITION
        System.out.println("================================\nAddition\n");
        UInputs();
        double answer = num1 + num2 + num3 + num4 + num5;
        System.out.println("\nSum : " + answer );
        System.out.println("================================\n");
    }
    else if (Choice == '-') {//SUBTRACTION
        System.out.println("================================\nSubtraction\n");
        System.out.print("1st Number: ");
        num1 = scan.nextDouble();
        System.out.print("2nd Number: ");
        num2 = scan.nextDouble();
        System.out.print("3rd Number: ");
        num3 = scan.nextDouble();
        System.out.print("4th Number: ");
        num4 = scan.nextDouble();
        System.out.print("5th Number: ");
        num5 = scan.nextDouble();
        double answer = num1 - num2 - num3 - num4 - num5;
        System.out.println("\nDifference : " + answer );
        System.out.println("================================\n");
    }

```