Beginner Java: Program Crashed when submitted (multiple methods) : My program crashed for some reason when I submitted it. I can't seem to figure out why. Our assignments are turned into hypergrade. That is where it crashed. Also how can I get it to display menu again after it displays "invalid selection"

>Here is my code


    import java.util.Scanner;
    import java.text.DecimalFormat;

    public class Homework8bbb
    {
    //create main
    public static void main(String[]args)
    {//open main method
      int selection;
      double meters;
   
      Scanner keyboard = new Scanner(System.in);
   
      DecimalFormat format = new DecimalFormat("##.00");
   
       //call showMenu method
       //DISPLAY showMenu method
      do
      {
         showMenu();  
       //get user [selection]
         selection = keyboard.nextInt();
      //validate selection
         do {   
            if (selection < 1 || selection > 4)  
            {
               System.out.print("Invalid selection\n");
               selection = keyboard.nextInt();
            }   
         }while(selection < 1 || selection > 4);
      
       //get [meters]
         System.out.print("How many meters?\n");
         meters = keyboard.nextInt();
           //validate meters: do not allow negative meters
         while (meters < 0)
         {
            System.out.print("Invalid Selection. Please enter a positive number:\n");
            meters = keyboard.nextInt();
         }
      
         switch (selection)
         {
            case 1: calcKilometers(meters);
               break;
            case 2: calcInches(meters);
               break;
            case 3: calcFeet(meters);
               break;
            case 4: 
               break; }
      }while(selection != 4);
   
   
     }
  

     public static void showMenu()
     {
   
      System.out.print("\n"
         + "METER CONVERSION\n"
         + " 1) Convert to Kilometers\n"
         + " 2) Convert to Inches\n"
         + " 3) Convert to Feet\n"
         + " 4) Quit the Program\n"
         + " Please make a selection:\n");
    }
  
    //calcKilometers method
    public static double calcKilometers(double meters)
    {
   
      double kilometers;
      kilometers = meters * 0.001;
   
      System.out.println(meters + " meters is " +
         kilometers + " kilometers.");
      return kilometers;
    }


    //calcInches method
    public static double calcInches(double meters)
    {
      double inches;
      inches = meters * 39.37;
   
      System.out.println(meters + " meters is " +
         inches + " inches.");
      return inches;
    }

    //calcFeet method
    public static double calcFeet(double meters)
    {
      double feet;
      feet = meters * 3.281;
      System.out.println(meters + " meters is " +
         feet + " feet.");
   
      return feet;
    }



    }//close class