public class ArrayTest {
public static void main(String[] args)
{
I[] i = new I[2];//创建引用,并没有创建接口的实例
i[0] = new C(); //多态
i[1] = new C();
}
}
interface I
{
}
class C implements I
{
}
public class ArrayTest {
public static void main(String[] args)
{
I[] i = new I[2];//创建引用,并没有创建接口的实例
i[0] = new C(); //多态
i[1] = new C();
}
}
interface I
{
}
class C implements I
{
}