-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterface1.java
More file actions
54 lines (37 loc) · 804 Bytes
/
Interface1.java
File metadata and controls
54 lines (37 loc) · 804 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
51
52
53
54
interface Ground{
default void Melborne()
{
System.out.println("I am the biggest cricket ground in the world");
}
default void Lords()
{
System.out.println("Im the home of Cricket");
}
}
interface Player
{
default void Virat()
{
System.out.println("Im the Greatest Cricketor");
}
default void Smith()
{
System.out.println("Im the best test batsman");
}
}
class Cricket implements Ground,Player{
public void bat()
{
System.out.println("bat");
}
}
class cricketor implements Player{
}
public class Interface1 {
public static void main(String[] args) {
Cricket c=new Cricket();
c.Melborne();
cricketor c1=new cricketor();
c1.Virat();
}
}