-
Notifications
You must be signed in to change notification settings - Fork 0
/
Example.java
43 lines (34 loc) · 1.16 KB
/
Example.java
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
package com.trl.theoreticalKnowledge.functionalInterface.a.a1;
public class Example {
}
@FunctionalInterface
interface SomeFunctionalInterface_1 {
void someMethod ();
}
@FunctionalInterface
interface SomeFunctionalInterface_2 extends SomeFunctionalInterface_1 {}
@FunctionalInterface
interface SomeFunctionInterface_3 extends SomeFunctionalInterface_1 {
void someMethod();
}
@FunctionalInterface
interface SomeFunctionalInterface_4 extends SomeFunctionalInterface_1 {
default void someDefaultMethod() {}
static void someStaticMethod() {}
}
@FunctionalInterface
interface SomeFunctionalInterface_5 {
String SOMEVALUE_1 = "";
String SOMEVALUE_2 = "";
void someMethod ();
}
// Compilation ERROR !!! "Functional Interface" must have one abstract method.
//@FunctionalInterface
//interface SomeFunctionalInterface_6 {
//}
// Compilation ERROR !!! "Functional Interface" must have one abstract method. But this "Functionl Interface" have two
// "Abstract Methods". One "Abstract Method" is someMethod_1() and another is someMethod().
//@FunctionalInterface
//interface SomeFunctionInterface_7 extends SomeFunctionalInterface_1 {
// void someMethod_1();
//}