javaでinterfaceの継承サンプル

コード下記:
interface A
{
int PROP_A = 5;
void testA();
}
interface B
{
int PROP_B = 6;
void testB();
}
interface C extends A, B
{
int PROP_C = 7;
void testC();
}

public class myJavaTest
{
public static void main(String[] args)
{
System.out.println(C.PROP_A);
System.out.println(C.PROP_B);
System.out.println(C.PROP_C);

}
}

結果:
5
6
7

Java

Posted by arkgame