import java.util.Scanner;

public class UnitConverter {
    public static void main(String[] args) {
        int choice = 0;
        double num = 0.0;
        Scanner in = new Scanner(System.in);
        System.out.print("In what unit is your current number in? (1=meters;2=feet;3=miles)\n");
        try {
            choice = in.nextInt();
            System.out.println(choice);
        } catch (Exception e) {
            System.out.println("not an int");
        }
        in.close();
        in = new Scanner(System.in);
        System.out.print("whats the number you want to convert\n");
        try {
            num = in.nextDouble();
            System.out.println(num);
        } catch (Exception e) {
            System.out.println("not a double");
        }
        in.close();
        if (choice==1) {
            double feet = num*3.28084;
            double miles = num*0.000621371;
            System.out.println(num + " in feet is " + feet + " ft\n" + num + " in miles is " + miles + " mi");
        }
        else if (choice==2) {
            double meter = num*0.3048;
            double miles = num/5280;
            System.out.println(num + " in meters is " + meter + " m\n" + num + " in miles is " + miles + " mi");
        }
        else if (choice==3) {
            double meter = num*1609.34;
            double feet = num*5280;
            System.out.println(num + " in meters is " + meter + " m\n" + num + " in feet is " + feet + " ft");
        }
    }
}

UnitConverter.main(null);
In what unit is your current number in? (1=meters;2=feet;3=miles)
3
whats the number you want to convert
69.0
69.0 in meters is 111044.45999999999 m
69.0 in feet is 364320.0 ft