title: Java implicit methods/parameters?
body: <p>im currently reading a book about programming Android and there is a nice little reference guide on Java in the beginning chapters. However, I stumpled upon something about implicit parameters that I did not quite understand.</p>
  
  <p>He defines the class <strong>Car</strong>:</p>
  
  <pre><code>public class Car {
    public void drive() {
      System.out.println("Going down the road!");
    }
  }
  </code></pre>
  
  <p>Then he continues on with this:</p>
  
  <pre><code>public class JoyRide {
   private Car myCar;
  
   public void park(Car auto) {
     myCar = auto;
   }
  
   public Car whatsInTheGarage() {
     return myCar;
   }
  
   public void letsGo() {
     park(new Ragtop()); // Ragtop is a subclass of Car, but nevermind this.
     whatsInTheGarage().drive(); // This is the core of the question.
   }
  }
  </code></pre>
  
  <p>I just want to know how we can call drive() from the class <strong>Car</strong> when <strong>JoyRide</strong> is not an extension of <strong>Car</strong>. Is it because the method whatsInTheGarage() is of return type <strong>Car</strong>, and thus it "somehow" inherits from that class?</p>
  
  <p>Thanks.</p>