-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultipleInher.java
More file actions
50 lines (42 loc) · 971 Bytes
/
Copy pathMultipleInher.java
File metadata and controls
50 lines (42 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package day23;
interface CSE{
void x();
int addtask(int x,int y);
}
interface AIML{
void x();
int addtask(int x,int y,int z);
int subtask(int x,int y);
}
class student implements CSE,AIML{
@Override
public int subtask(int x, int y) {
// TODO Auto-generated method stub
return x-y;
}
@Override
public int addtask(int x, int y) {
// TODO Auto-generated method stub
return x+y;
}
@Override
public void x() {
// TODO Auto-generated method stub
System.out.println("js one()");
}
@Override
public int addtask(int x, int y, int z) {
// TODO Auto-generated method stub
return x+y+z;
}
}
public class MultipleInher {
public static void main(String[] args) {
// TODO Auto-generated method stub
student s1=new student();
s1.x();
System.out.println(s1.addtask(17,2006 ));
System.out.println(s1.subtask(49, 90));
System.out.println(s1.addtask(1, 8, 9));
}
}