나는 AP CS에 있는데 이것이 작동하는지 알아 내려고하고있다.AP CS Practice - OOP
public interface Controller
public class Widget implements Controller
public class Thingy extends Widget
Controller myControl = new Thingy();
맨 위에있는 인터페이스/클래스가 실제로 정의된다고 가정하십시오. 네 번째 줄 (Controller myControl = new Thingy();
)이 작동합니까? 아니면 그런 인터페이스에서 객체를 만들 수 없습니까?
예 – Adrian