纠错
全专业资料、题库、学位、网课
最高直省2344元
上千+科次精品网课
买网课即送全真模考题库
五千+科次教材资料
电子资料满三件9折
五千+科次在线题库
全真呈现历年考试试题
1、[单选题]能创建BufferedReader对 象的Java程序代码是
2、[填空题]Java图形用户界面中经常用到的按钮JButton类的直接父类是_
3、[主观题]在子类的构造方法中,调用super(参数列表)的作用是什么?参数列表有何要求?
4、[主观题]阅读以下程序,写出该程序的输出结果。
public class Test29 {
double d;
void change 1(int num) { num= 100; }
void change2(String str) { str- new String("false"); }
void change3(Test29 ex ){ ex.d=100; }
public static void main(String[] args) {
Test29 ex = new Test290;
inti= 15; ex.change1(i);
System.out.printn("i value is"+ i);
String s = new String( "true" ); ex.change2(s) ;
System.out.printIn("s value is"+ s);
ex.d = 15; ex.change3(ex) ;
System.out.printIn("Current ex.d is"+ ex.d);
}
}
5、[主观题]阅读以下程序,写出该程序的输出结果。
class House{
private String typeH;
private double area;
public String getTypeHO{ returm typeH; }
public void setTypeH(String typeH){ this.typeH=typeH; }
public double getAreaO{ retum area; }
public void setArea(double area){ this.area=area; }
House(String typeH, double area){ this.typeH=typeH; this.area=area; }
HouseO{ typeH="Default"; this.area=0; }
public String toString0{
String s=typeH+"t"+area;
return s;
}
class Apartment extends House{
private String addres;
Apartment(String typeH, double area, String address){
super(typeH, area);
this.address=address;
ApartmentO{
super0;
this.address="address";
void printO{
String s=super.toStringO +”"+address;
System.out. println(s);
}
}
public class Test30{
public static void main(String 0] args){
Apartment st=new Apartment("ab", 125.2, "Nanhai");
st. printO ;
st=new Apartment(;
st. printO;
Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.
温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。