class A
{
int x;
int y;
void get(int p, int q)
{
x = p;
y = q;
}
void show()
{
System.out.println(x);
}
}
class B extends A
{
public static void main(String ar[])
{
A a = new A();
a.get(5,6);
a.show();
}
void display()
{
System.out.println("B");
}
}
OUTPUT
Comments
Post a Comment