title: Why to use Polymorphism?
body: <p>I have the following code in which I have a parent class and its child. I am trying to determine how the code benefits from using polymorphism. </p>
  
  <pre><code>class FlyingMachines {
      public void fly() {
          System.out.println("No implementation");
      }
  }
  
  class Jet extends FlyingMachines {
      public void fly() {
          System.out.println("Start, Taxi, Fly");
      }
  
      public void bombardment() {
          System.out.println("Throw Missile");
      }
  }
  
  public class PolymorphicTest {
      public static void main(String[] args) {
          FlyingMachines flm = new Jet();
          flm.fly();
  
          Jet j = new Jet();
          j.bombardment();
          j.fly();
      }
  }
  </code></pre>
  
  <p>What is the advantage of polymorphism when both <code>flm.fly()</code> and <code>j.fly()</code> give me the same answer?</p>