mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
20 lines
388 B
Java
20 lines
388 B
Java
class JavaClass {
|
|
public interface Super1<T> {
|
|
Thread call(T t);
|
|
}
|
|
|
|
public interface Super2<T> {
|
|
T call(String s);
|
|
}
|
|
|
|
public interface Sub extends Super1<String>, Super2<Thread> {
|
|
Thread call(String s);
|
|
}
|
|
|
|
static void samAdapter(Sub sub) {
|
|
((Super1) sub).call("");
|
|
((Super2) sub).call("");
|
|
sub.call("");
|
|
}
|
|
}
|