相关题目
为使下列代码正常运行,应该在下划线处填入的选项是:
int[] numbers=new int[n];
for(int i=0;i
下列代码将对象写入的设备是:
ByteArrayOutputStream bout=new ByteArrayOutputStream();
ObjectOutputStream out=new ObjectoutputStream(bout);
out.writeObject(this);
out .close();
为使下列代码正常运行,应该在下划线处填入的选项是:
ObjectInputStream in=
new_____(new FileInputStream("employee . dat"));
Employee[] newStaff=(Employee[])in.readObject();
in .cIose();
Java程序默认引用的包是:
下列选项中属于字符串常量的是:
类变量必须带有的修饰符是:
下列选项中,不能输出100个整数的是:
下列不属于接口WindowListener的方法是:
下列程序片段中,能通过编译的是:
下列程序的运行结果是:
public class test{
private String[] data={"10","10.5"};
public void fun(){
double s=0;
for(int i=0;i<3;i++){
try{
s=s+Integer .parseInt(data[i]);
}catch(Exception e){
System.out.print("errorl:"+data[i]);
}
}
}
public static void main(String[]args){
try{
test d=new test();
d .fun();
}catch(Exception e){
System.out.println("error2");
}
}
}
