Hi all,
I have create a program of multiple inheritance in java
My file name is 11.java
Here is my program :
I have run this but the following error occurred :-
Error :
Please give me any suggestion to solve this error.
I have create a program of multiple inheritance in java
My file name is 11.java
Here is my program :
Code:
class abc
{
int a,b;
abc()
{
a=b=10;
}
abc(int x)
{
a=b=x;
}
}
class def extends abc
{
int d,e,f;
def()
{
d=e=f=15;
}
def(int m,int n,int o)
{
super(m);
d=n;
e=f=0;
}
void dis()
{
System.out.print(a + " " + b + " " + d + " " + e + " " + f);
}
}
class mno extends def
{
int m,n;
mno()
{
m=n=20;
}
mno(int q, int r, int s, int t)
{
super(q,r,s);
m=s;
n=t;
}
void show()
{
System.out.print(m + " " + n);
}
}
class exminh
{
public static void main(String args[])
{
mno x=new mno();
mno y=new mno();
mno(57,67,76,81);
x.show();
x.dis();
y.show();
y.dis();
}
}
Error :
Code:
11.java:55: cannot find symbol
symbol : method mno(int,int,int,int)
location: class exminh
mno(57,67,76,81);
^
1 error
Comment