最新回答 / 东北梁朝伟
package com.java.test;/* * 你有没有写测试类 这个是可以运行的 * * */public class Test { public static void main(String[] args) { // TODO Auto-generated method stub Telephone t = new Cellphone(); t.call(); t.message(); }}
2016-03-20
最新回答 / 蓝天16
代码大致功能实现了,有些细节还没弄好,我想先请教下在结构上有没有可以优化的地方。先上main函数:<...code...><...code...>子类奥迪:<...code...>子类马自达:<...code...>子类皮卡...
2016-03-20
最新回答 / 慕无忌7510152
Animal obj1=new Dog();obj1引用的属性的父类的可以试试//父类public class Vehicle {int passenger;}//子类public class Car extends Vehicle{ int passenger = 4; }//测试类public class initial {public static void main(String[] args) {Car obj1 = new Car();System.out.println(obj1.passe...
2016-03-19