当前位置: 答题翼 > 问答 > 求职面试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

interface Playable { void play(); } interface Bounceable { void play(); } inter


interface Playable {

void play();

}

interface Bounceable {

void play();

}

interface Rollable extends Playable, Bounceable {

Ball ball = new Ball("PingPang");

}

class Ball implements Rollable {

private String name;

public String getName() {

return name;

}

public Ball(String name) {

this.name = name;

}

public void play() {

ball = new Ball("Football");

System.out.println(ball.getName());

}

}

这个错误不容易发现。

参考答案
您可能感兴趣的试题
  • interface Playable { void play(); } interface Bounceable { void play(); } inter

  • interface A{int x = 0;}class B{int x =1;}class C extends B implements A {public void pX

  • interface A{int x = 0;}class B{int x =1;}class C extends B implements A {public void pX

  • interface Playable {void play();}interface Bounceable {void play();}interface Rollable

  • interface Playable {void play();}interface Bounceable {void play();}interface Rollable

  • 以下所列的各函数首部中 正确的是()A.void play (var:Integer var b:Integer)B.void play(int a