程序会报错

来源:10-5 Java 中的接口

qq_还有什么过不了_0

2015-12-29 09:56

在inital类里 IPlayGame ip1 = new SmartPhone();报错

写回答 关注

2回答

  • qq_还有什么过不了_0
    2015-12-29 10:52:19


    public class Initial {

     public static void main(String[] args) {
      // TODO Auto-generated method stub

        Telphone tel1 =new Cellphone();
        tel1.call();
        tel1.message();
        Telphone tel2 =new Smartphone();
        tel2.call();
        tel2.message();
       
        IPlayGame ip1 = new Smartphone();
        IPlayGame ip2 =new Psp();
      
       }

    }

    收拾好鑫情

    我的没报错

    2015-12-31 21:42:46

    共 2 条回复 >

  • 天启之魂
    2015-12-29 10:12:34

    你写的太简洁了,报的什么错,还有其余的代码怎么写的....才能判断

Java入门第二季 升级版

课程升级!以终为始告别枯燥,在开发和重构中体会Java面向对象编程的奥妙

530105 学习 · 6086 问题

查看课程

相似问题