title: Superclass and subclass arguments
body: <p>I am providing two classes as follows:</p>
  
  <p>Appliance class</p>
  
  <pre><code>public class Appliance {
      void start(Appliance t){
          System.out.println("Start Appliance");
      }
  }
  </code></pre>
  
  <p>Toaster Class</p>
  
  <pre><code>public class Toaster extends Appliance {
      void start(Toaster t){
          System.out.println("Start Toaster");
      }
  }
  </code></pre>
  
  <p>RunAppliance Class</p>
  
  <pre><code>public class RunAppliance {
      public static void main(String[] args) {
          Appliance appliance = new Toaster();
          Toaster toaster = new Toaster();
          appliance.start(toaster);
      }
  }
  </code></pre>
  
  <p>Being a newbie,it confuses me between method overloading and overriding and also how arguments get impacted in one argument type is subclass of another argument type.Thus I am presenting 6 conditions for the same:</p>
  
  <p>1)<strong>Appliance Class</strong> : void start(<em>Appliance</em> t) ; <strong>Toaster Class</strong> : void start(<em>Appliance</em> t)</p>
  
  <p>2)<strong>Appliance Class</strong> : void start(<em>Toaster</em> t) ; <strong>Toaster Class</strong> : void start(<em>Toaster</em> t)</p>
  
  <p>3)<strong>Appliance Class</strong> : void start(<em>Appliance</em> t) ; <strong>Toaster Class</strong> : void start(<em>Toaster</em> t)</p>
  
  <p>4)<strong>Appliance Class</strong> : void start(<em>Toaster</em> t) ; <strong>Toaster Class</strong> : void start(<em>Appliance</em> t))</p>
  
  <p>5)<strong>Appliance Class</strong> : void start(<em>Appliance</em> t) &amp; void start(<em>Toaster</em> t) ; <strong>Toaster Class</strong> : void start(<em>Toaster</em> t)</p>
  
  <p>6)<strong>Appliance Class</strong> : void start(<em>Appliance</em> t) ; <strong>Toaster Class</strong> : void start(<em>Appliance</em> t) &amp; void start(<em>Toaster</em> t))</p>
  
  <p>Can anybody suggest me a necessary rule for the same.</p>