title: what is the returnBooking() method supposed to do?
body: <p>after I call this from other class I try to return to my previous class but It came out this error, below is my codes</p>
  
  <pre><code>public class Train extends Booking {
    public Train returnBooking(){
       int Tid,dest;
       Date now = new Date();
       Scanner sc= new Scanner(System.in);
       Scanner sc2=new Scanner(System.in);
   try{     
       System.out.println("Enter train ID");
       System.out.println("(**Example '1001'**)");
       Tid=sc.nextInt();
       System.out.println("1. Malacca Zoo to Night Safari");
       System.out.println("2. Malacca Zoo to River Safari");
       System.out.println("3. River Safari to Malacca Zoo");
       System.out.println("Enter a destination for the train");
       dest = sc.nextInt();
       System.out.println("Enter date: ");
       String date = sc2.nextLine();
  
       SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");  
       Date testDate = null;  
  
  
       try{
  
          testDate = df.parse(date);    
      }catch(ParseException e){ System.out.println("invalid format");} 
      if (!df.format(testDate).equals(date)){  
          System.out.println("invalid date!!");  
      } else {  
          System.out.println("valid date");  
      } 
  }catch(InputMismatchException e){System.out.print("Input must be numbers only");}
  return Booking.class;**//imcompatible type**
   }
  }
  </code></pre>
  
  <p>is my return method wrong? or just some simple mistake that I miss looked?</p>
  
  <p>here is my Booking class's code</p>
  
  <pre><code>public class Booking{
  public static void main(String[]agrs){
     Scanner sc = new Scanner(System.in);
  
     int sel,book_ticket, reschedule, cancel, add, remove, display, total, loop;
  
     System.out.println("\t\t\t\t\t****************************************************\t\t\t\t\t");
     System.out.println("\t\t\t\t\t*              Welcome to Malacca Zoo              *\t\t\t\t\t");
     System.out.println("\t\t\t\t\t*  This is our new online train reservstion system *\t\t\t\t\t");
     System.out.println("\t\t\t\t\t*  follow the instruction at below to perform your *\t\t\t\t\t");
     System.out.println("\t\t\t\t\t* reservation, hope you will enjoy our new services*\t\t\t\t\t");
     System.out.println("\t\t\t\t\t****************************************************\t\t\t\t\t");
     System.out.println("\n\n1.Select and book a ticket ");
     System.out.println("2.Reschedule a train");
     System.out.println("3.Cancel a reservation");
     System.out.println("4.Add new train service");
     System.out.println("5.Remove a train from service");
     System.out.println("6.Display total number of passengers");
     System.out.println("7.Total profit from a service");
     System.out.println("0.Exit");
     System.out.println("\nEnter the number to select the function that you want to perform");
  
  //try {
     sel=sc.nextInt();
     for(loop=0;loop&lt;2;loop++)   {
        if (sel==0)
        {
            System.exit(0);  
        }
        else if(sel == 4)
        {
           new Train();
        }
        else
        {
             System.out.println("You enter an invalid number. Please try again");
             sel=sc.nextInt();
             loop=0;
         }
      }
   // } catch (InputMismatchException e){
   // } finally {
   // }
   // System.out.print("Input must be a number between 1 and 0: ");
  }
  }
  </code></pre>