A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.Public interface Sortable{Void sort();}Public interface Drawable{Void draw();}Which is the correct implementation?
选项:
A:public class DrawList implements Sortable, implements Drawable{ public void sort() { /*implementation*/ } public void draw(){ /*implementation*/ }}
B:public class DrawList extends Sortable, Drawable{ public void sort() { /*implementation*/ } public void draw(){ /*implementation*/ }}
C:public class DrawList extends Sortable, extends Drawable{ public void sort() { /*implementation*/ } public void draw(){ /*implementation*/ }}
D:public class DrawList implements Sortable, Drawable{ public void sort() { /*implementation*/ } public void draw(){ /*implementation*/ }}
发布时间:2024-03-31 20:16:08