{
public void calc (int x, int y)
{
int z;
z = x * y;
}
}
class Override extends Funcover
{
public void calc (int x, int y)
{
int z;
z = x / y;
}
}
class Overrideex
{
{
Funcover f1 = new Funcover ();
f1.calc (7, 6);
Override f2 = new Override ();
f2.calc (14, 2);
}}
Java Program to demonstrate concept of Polymorphism function overriding
Reviewed by
on
September 06, 2019
Rating:
No comments: