客服信息:19139051760(微信同号)
首页
找答案
注册
登录
网站首页
名词解释
全部试题
平台查询
所有科目
成人高考报名
当前位置:
首页
>
江开
>
江苏开放大学JAVA程序设计形成性考核作业1
>
详细
以下程序的输出结果__。
public class Father {
String name, address, tel;
int age;
public Father(String name, int age) {
this.name = name;
this.age = age;
}
void out() {
System.out.print("姓名:" + name);
System.out.print(" 年龄:" + age);
}
void outOther() {
System.out.print(" 家庭住址:" + address);
System.out.print(" 电话:" + tel);
}
}
class Son extends Father {
String school;
public Son(String name, int age) {
super(name, age);
}
void out() {
super.out();
super.outOther();
System.out.println(" 学校:" + school);
}
public static void main(String args[]) {
Son son = new Son("Tom", 15);
son.address = "金水区";
son.school = "九中";
son.tel = "66123456";
son.out();
}
}
答案是:
姓名:Tom 年龄:15 家庭住址:金水区 电话:66123456 学校:九中
出自
江开
>
江苏开放大学JAVA程序设计形成性考核作业1
更多答案联系客服:19139051760
本题添加时间:2023/10/10 13:29:00
业余时间拿学历:
统考入学(成人高考)
山东成人高考(学历提升)报名入口
注册成会员
您可能感兴趣的试题
∴
阅读以下程序,写出输出结果。 class Animal { Animal() { System.out.print ("Animal "); } } public class Dog extends An
∴
以下程序段的输出结果为 5 6 7 8 9 。 public class TestArray { public static void main(String args[ ]){ i
∴
以下程序的输出结果为 。 class StringTest1 { public static void main(String[] args) { String s1="hello"; Strin
∴
import java.io.* ; public class abc { public static void main(String args[ ]) { System.out
具体学校专业科目
山东财经大学
山东大学
山东师范大学
济南大学
中国海洋大学
青岛大学
山东科技大学
青岛科技大学
临沂大学
中国石油大学
山东建筑大学
德州学院
曲阜师范大学
鲁东大学
山东农业大学
山东理工大学
潍坊学院
山东艺术学院
齐鲁工业大学
聊城大学
业余时间拿学历:
成人高考报名入口
国家开放大学答案
联大系统答案
青书学堂答案
柠檬文才答案
学起plus弘成