title: Calling a method within the superclass while instantiating a subclass
body: <p>I have an abstract class that several classes inherit from with attributes <code>health</code> and <code>damageTaken</code>, and within it there's a method called <code>takeDamage()</code>. Here's what it does:</p>
  <pre><code>public double takeDamage(int damage) {
     if(health &lt;= 0) {
        return 0;
     }
     
     damageTaken += damage;
     health -= damage;
     
     return health;
  }
  </code></pre>
  <p>Since several classes <code>extend</code> the class, I'm trying to get the class <code>Zombie</code> to be instantiated and call the <code>takeDamage()</code> in a <code>Test</code> class. Here's my code for that:</p>
  <pre><code>Zombie rob = new Zombie(100, 12, 3.4, 16, true, 500, &quot;Sample Description&quot;);
  rob.takeDamage(15);
  </code></pre>
  <p>When I try to call <code>takeDamage()</code>, I get a &quot;cannot resolve symbol&quot; error. I don't want to override <code>takeDamage()</code> in every single class this inherits from, instead I want the superclass' methods to be able to be called when instantiating a subclass. Any way to do that?</p>