class M
{
int i,j;
M(int a,int b)
{
i=a;
j=b;
}
void show()
{
System.out.println("i and j: "+i+" "+j);
}
}
class X extends M
{
int k;
X(int a,int b,int c)
{
super(a,b);
k=c;
}
void show()
{
System.out.println("k: "+k);
}
}
public class Nineteen {
public static void main(String args[])
{
X obj=new X(3,2,5);
obj.show();
}
}
{
int i,j;
M(int a,int b)
{
i=a;
j=b;
}
void show()
{
System.out.println("i and j: "+i+" "+j);
}
}
class X extends M
{
int k;
X(int a,int b,int c)
{
super(a,b);
k=c;
}
void show()
{
System.out.println("k: "+k);
}
}
public class Nineteen {
public static void main(String args[])
{
X obj=new X(3,2,5);
obj.show();
}
}
No comments:
Post a Comment