A.adopted
B.adapted
C.adjusted
D.assisted
第1题:
A、were/were
B、was/is
C、were/was
D、was/were
第2题:
现有磁盘文件filea.txt和fileb.txt,各存放一行字母,上述程序实现了将2个磁盘文件中的内容合并,并按照字母的升序排列,存放到一个新的文件new.txt中。请将程序补充完整。
注意:不改动程序结构,不得增行或删行。
package ch3;
import java.util.*;
import java.io.*;
public class ex3
{
public static void main(String[] args)
{
String s="";
try
{
RandomAccessFile f1=
new RandomAccessFile("ch3/filea.txt","rw");
______f2=new ______("ch3/fileb.txt","rw");
s=f1.readLine()+f2.readLine();
char c[]=s.toCharArray();
Arrays.sort(c);
______Out=new______("ch3/new.txt");
for(int i=0;i<c.length;i++)
{
Out.______(c[i]);
}
out.______;
f1.close();
f2.close();
}
catch(I0Exception ioe)
{
ioe.printStackTrace();
}
}
}
第3题:
第4题:
classBitStuff{BitStuffgo(){System.out.print("bits");returnthis;}}classMoreBitsextendsBitStuff{MoreBitsgo(){System.out.print("more");returnthis;}publicstaticvoidmain(String[]args){BitStuff[]bs={newBitStuff(),newMoreBits()};for(BitStuffb:bs)b.go();}}结果为:()
A.bitsbits
B.bitsmore
C.moremore
D.编译失败
第5题:
第6题: