title: Illegal start of expression for public class
body: <p>I'm trying to write a program that utilizes the Abstract class feature of java. I'm getting an "illegal start of expression" error for line 63, which declares the public class AbstractCar. Can anyone explain why I'm getting this error and how I can correct it. Thank you in advance</p>
  
  <pre><code>public class AbstractCar {
    public static final void main(String args[]) {
  
      abstract class Vehicle {
        //subclasses will inherit an attribute
        int maxSpeed;
        //subclasses must implement this method 
        //(otherwise they have to be declared as abstract classes)
        abstract void showMaxSpeed();
        //subclass will have this method (through inheritance) as is (default implementation)
        //or they may implement their own implementation (override a method)
        int getWheelsNumber() {
          return 4;
        }
      }
  
      /**Car IS-A Vehicle*/
      class Car extends Vehicle {
        public Car() {
          maxSpeed = 180;
        }
  
        public void showMaxSpeed() {
            System.out.println("Car max speed: " + maxSpeed + " km/h");
          }
          //Car class will inherit getWheelsNumber() method from the parent class
          //there is no need to override this method because default implementation
          //is appropriate for Car class - 4 wheels
      }
  
      /**Bus IS-A Vehicle*/
      class Bus extends Vehicle {
        public Bus() {
          maxSpeed = 100;
        }
  
        public void showMaxSpeed() {
            System.out.println("Bus max speed: " + maxSpeed + " km/h");
          }
          //Bus class will override this method because the default implementation
          //is not appropriate for Bus class
        public int getWheelsNumber() {
          return 6;
        }
      }
  
      /**Truck IS-A Vehicle*/
      class Truck extends Vehicle {
        public Truck() {
          maxSpeed = 80;
        }
  
        public void showMaxSpeed() {
            System.out.println("Truck max speed: " + maxSpeed + " km/h");
          }
          //Truck class will override this method because the default implementation
          //is not appropriate for Bus class
        public int getWheelsNumber() {
          return 10;
        }
      }
  
      public class AbstractCar {
  
        public static void main(String[] args) {
          Vehicle car = new Car();
          Vehicle bus = new Bus();
          Vehicle truck = new Truck();
          car.showMaxSpeed();
          bus.showMaxSpeed();
          truck.showMaxSpeed();
          System.out.println("Wheels number-car:" + car.getWheelsNumber() +
            ", bus:" + bus.getWheelsNumber() + ", truck:" + truck.getWheelsNumber());
        }
      }
  
    }
  }
  </code></pre>