[试题]

interface Playable {

void play();

}

interface Bounceable {

void play();

}

interface Rollable extends Playable, Bounceable {

B.all 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();}interfa

[试题]interface Playable {void play();}interface Bounceable {void play();}interface Rollable extends Playable, Bounceable {B.all ball = new Ball("PingPang");}class Ball implements Rollable {private String name;public String getName() {return name;}public

  • 查看答案
  • The international transport and the inte

    [单选题]The international transport and the international logistics are same. Is it correct or not? ()A . Not mention in the paragraphB . Not clearC . WrongD . Right

  • 查看答案
  • In a purifier, the interface between the

    [单选题]In a purifier, the interface between the liquid seal and the oil should be positioned as close as possible to ().A . the outlet of oilB . the outlet of waterC . the bowl peripheryD . the center of bowl

  • 查看答案
  • Edward, you play so well. But I you play

    [单选题]E.dward, you play so well. But I you played the piano. A. didn’t know B. hadn’t known C. don’t know D. haven’t known

  • 查看答案
  • Business intelligence (BI) is the inte

    [单选题] Business intelligence (BI) is the integrated application of data warehouse, data mining and (73).(73)A.OLAPB.OLTPC.MRPIID.CMS.

  • 查看答案
  • ________ to speak when the audience inte

    [单选题]________ to speak when the audience interrupted him.[A] Hardly had he begun[B] No sooner had he begun[C] Not until he began[D] Scarcely did he begin

  • 查看答案
  • 接口(interface)是指:()

    [填空题] 接口(interface)是指:()

  • 查看答案
  • The position of the interface between oi

    [单选题]The position of the interface between oil and water within the centrifuge is achieved by the use of ().A . gravity discB . centrifugal bowlC . a stack of discsD . main sealing ring

  • 查看答案
  • Which of following interface are not usi

    [单选题]Which of following interface are not using CCS7 protocol?()A . GnB . GdC . GsD . Gr

  • 查看答案
  • Bluetooth is a universal radio interface

    [单选题]B.luetooth is a universal radio interface in the(71)frequency hand that enables portable electronic devices to connect and communicate wirelessly via short-range, ad hoc networks. Each unit can simultaneously communicate with up to(72)other units per

  • 查看答案