title: Inheritance not working
body: <p>Hey im just practicing inheritance and i encountered a problem.  Im getting an error in my car class(sub-class)  that the variables in Vehicle(parent) are not visible.  i didnt do anything to change this and i dont even know how to make it invisible.  Can anyone help me with this.</p>
  
  <pre><code>public class Vehicle 
  {
      private String make, model, colour;
      private int registrationNumber;
  
      public Vehicle()
      {
          this.make = "";
          this.model = "";
          this.colour = "";
          this.registrationNumber = 0;
  
  
      }
  
  
      public Vehicle(String make, String model, String colour,
              int registrationNumber) 
      {
          this.make = make;
          this.model = model;
          this.colour = colour;
          this.registrationNumber = registrationNumber;
      }
  
  
      public String getMake() 
      {
          return make;
      }
  
  
      public void setMake(String make) 
      {
          this.make = make;
      }
  
  
      public String getModel() 
      {
          return model;
      }
  
  
      public void setModel(String model) 
      {
          this.model = model;
      }
  
  
      public String getColour() 
      {
          return colour;
      }
  
  
      public void setColour(String colour) 
      {
          this.colour = colour;
      }
  
  
      public int getRegistrationNumber() 
      {
          return registrationNumber;
      }
  
  
      public void setRegistrationNumber(int registrationNumber) 
      {
          this.registrationNumber = registrationNumber;
      }
  
  
  
      public String toString() 
      {
          return "Vehicle [make=" + make + ", model=" + model + ", colour="
                  + colour + ", registrationNumber=" + registrationNumber + "]";
      }
  
  
  
  
  
  
  }
  
  public class Car extends Vehicle
  {
  private int doors;
  private String shape;
  
  public Car()
  {
      super();
      this.doors = 0;
      this.shape = "";
  }
  
  public Car(String make, String model, String colour, int registrationNumber) 
  {
      super(make, model, colour, registrationNumber);
      this.make = make;
      this.model = model;
      this.colour = colour;
      this.registrationNumber = registrationNumber;
  
  
  }
  
  
  
  
  
  
  }
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>Description Resource    Path    Location    Type
  The field Vehicle.make is not visible   Car.java    /VehicleApp/src line 19 Java Problem
  The field Vehicle.model is not visible  Car.java    /VehicleApp/src line 20 Java Problem
  The field Vehicle.colour is not visible Car.java    /VehicleApp/src line 21 Java Problem
  The field Vehicle.registrationNumber is not visible Car.java    /VehicleApp/src line 22 Java Problem
  </code></pre>