JavaCompilerCore/resources/bytecode/javFiles/Interfaces.jav

33 lines
497 B
Plaintext
Raw Permalink Normal View History

2023-10-19 15:02:22 +00:00
import java.lang.Integer;
interface A {
void method1();
default method2() {
}
}
interface B {
void method3();
}
interface C {
Integer myInt();
}
class ClassX implements A {
}
record ClassY(Integer myInt) implements C {}
public class Interfaces implements A, B {
public void method1() {
}
public void method3() {
var intf = new Interfaces();
intf = new ClassX();
intf.method1();
C c = new ClassY(10);
c.myInt();
}
}