-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannotations.java
More file actions
70 lines (54 loc) · 981 Bytes
/
Copy pathannotations.java
File metadata and controls
70 lines (54 loc) · 981 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class one
{
public void show()
{
System.out.println("in one show");
}
public void conf()
{
System.out.println("in A conf");
}
}
class two extends one
{
@Override
public void show()
{
System.out.println("in two show");
}
}
@FunctionalInterface
interface A
{
void showA();
// functionalinterface will have only one method
// void showA2();
}
class three implements A
{
public void showA()
{
System.out.println("in A show");
}
}
@FunctionalInterface
interface B
{
void showB();
}
public class annotations {
public static void main(String[] args) {
one obj = new two();
obj.show();
obj.conf();
three obj1 = new three();
obj1.showA();
B obj2 = new B() {
public void showB()
{
System.out.println("in interface B");
}
};
obj2.showB();
}
}