67 lines
847 B
Java
67 lines
847 B
Java
package org.eidecker.oca8lernen.general;
|
|
|
|
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
|
|
import java.io.IOException;
|
|
import java.nio.file.AccessDeniedException;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
class TestInterfaces {
|
|
|
|
@Test
|
|
public void testMe() {
|
|
I1 i1 = new Interfaces();
|
|
i1.method1();
|
|
// i1.method2();
|
|
}
|
|
|
|
}
|
|
|
|
public class Interfaces extends AbstractClass implements I1 {
|
|
|
|
public void method1() {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void method2() throws IOException {
|
|
I1.method3();
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
abstract class AbstractClass {
|
|
|
|
public abstract void method1() throws IOException;
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract interface I1 {
|
|
|
|
int i = 1;
|
|
|
|
static void initialize() {
|
|
|
|
}
|
|
|
|
static void method3() {
|
|
System.out.println("Hallo aus I1");
|
|
}
|
|
|
|
void method1();
|
|
|
|
|
|
void method2() throws IOException;
|
|
|
|
public abstract interface I2 extends I1 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|