<p>Firstly I'm extending an existing class structure and cannot alter the original, with that caveat:</p>

<p>I would like to do this:</p>

<pre><code>class a
{
   int val;

   ... // usual constructor, etc...

   public int displayAlteredValue(int inp)
   {
     return (val*inp);
   }
}

class b extends a
{
   ... // usual constructor, etc...

   public in displayAlteredValue(int inp1, int inp2)
   {
     return (val*inp1*inp2);
   }
}
</code></pre>

<p>As I said before I cannot alter <code>class a</code> and I want to maintain the function name <code>displayAlteredValue</code> rather than making a new function.
If this can be done I only have to change a few instantiations of <code>a</code> to instantiations of <code>b</code>. I don't want to spend a lot of time replacing the many function calls to <code>displayAlteredValue</code>. (And yes I do realise there are such things as search and replace however for other reasons, doing that would be problematic).</p>

<p>Any ideas?</p>

what if you add this to your derived class
```
```
public int displayAlteredValue(int inp)
{
  return super.displayAlteredValue(inp);
}
```
```