接口的定义与实现 — 程序设计选择题
题目
已知接口定义如下:interface Playable { void play(); }。现有四个类声明,逐个判断其能否通过编译:① abstract class Robot implements Playable { };② class Cat implements Playable { public void play() { } };③ class Dog implements Playable { void play() { } };④ class Bird implements Playable { public void sing() { } }。则能通过编译的声明是( )
A. ①② B. ②③ C. ②④ D. ①②④