I am trying out an association example in java; when compiling, it gives the error message saying "java cannot find main in CarClass". I double checked the "main" syntax, tried multiple versions - still doesn't work. Appreciate any help!
class CarClass{
   String carName;
   int carId;
   CarClass(String name, int id)
   {
    this.carName = name;
    this.carId = id;
   }
}
class Driver extends CarClass{
   String driverName;
   Driver(String name, String cname, int cid){
    super(cname, cid);
    this.driverName=name;
   }
}
class TransportCompany{
   public static void main(String args[])
   {
    Driver obj = new Driver("Andy", "Ford", 9988);
    System.out.println(obj.driverName+" is a driver of car Id: "+obj.carId);
   }
}
Thanks.
 
     
    