网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
DataInputStream与DataOutputStream的特点()
A
读写数据时与具体的机器无关
B
读写数据时与具体的机器有关
C
读数据时与机器有关,而写数据时与机器无关
D
读数据时与机器无关,而写数据时与机器有关
参考答案
参考解析
解析:
暂无解析
更多 “单选题DataInputStream与DataOutputStream的特点()A 读写数据时与具体的机器无关B 读写数据时与具体的机器有关C 读数据时与机器有关,而写数据时与机器无关D 读数据时与机器无关,而写数据时与机器有关” 相关考题
考题
在J2EE中,某一java程序中有如下代码:DataInputStream din=new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat")));System.out.print(din.readByte());假设在employee.dat文件中只有如下一段字符:abcdefg。则:System.out在屏幕上打印()。A.aB.bC.97D.98
考题
阅读下面程序import java.io.*;public class ByteStream Test{public static void main(String[] a){int[] myArray = {10,20.30,40};try{DataOutputStream dos = new DataOutputStream(new _________________( " ints.dat " ));for (int i=0;imyArray.length;i++)dos.writeInt(myArray[i] ) ;dos.close();S ystem.out.println( " Have written binary file ints.dat " );}catch (IOException ioc){System.out.println( " IO Exception " );}}}为保证程序正确运行,在程序中下划线处应填入的代码是A)FileOutputStreamB)ByteArrayOutputStreamC)BufferedOutputStreamD)FileWriter
考题
Java 类库中,将信息写入内存的类是A ) java.io.FileOutputStreamB ) java.io.ByteArrayOutputStreamC ) java.io.BufferedOutputStreamD ) java.io.DataOutputStream
考题
请完成下列Java程序:实现打印出自己的源文件的功能。注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。import java.io.*;import java.util.StringTokenizer;public class ex27_2{public static void main(String args[])throws IOException{FileInputStream fis=new FileInputStream("ex27_2.java");DataInputStream dis=new DataInputStream(fis);String str=null;while(true){__________________;if(str==null){__________________;}StringTokenizer st=new StringTokenizer(str);while(st.hasMoreTokens()){System.out.print(st.nextToken()+ " " );}System.out.println();}}}
考题
阅读下面写文件的程序 import java. io. *; public class WriteFile{ public static void main(String[]A) { int[]myArray={10,20,30,40}; try{ FileOutputStream f=new FlieOutStream("ints. dat"); DataOutputStream______=new DataOutputStream(f); for(int i=0; i<myArray. length; i ++) dos. writeInt(myArray[i]); dos. close(); System. out. prinfln("Have written binary file ints. dat"); } catch(IOException ioe){ System. out. println("IO Exception"); } } 在程序下画线处填入的正确选项是A.myArrayB.dosC.ioeD.ints
考题
Java类库中,将信息写入内存的类是( )。A.java.io.FileOutputStreamB.java.io.ByteArrayOutputStreamC.java.io.BufferedOutputStreamD.j ava.io.DataOutputStream
考题
在J2EE中,下面代码中,()不会编译错误。 A、File f = new File("/","autoexec.bat");B、DataInputStream din = new DataInputStream(new FileInputStream("autoexec.bat"));C、InputStreamReader in = new InputStreamReader(System.in);D、OutputStreamWriter out = new OutputStreamWriter(System.in);
考题
在J2EE中,在提供名为sock的套接字实例的前提下,为了后去通过套接字进行通信的输出流,你可以编写() A、sock.accept()B、sock.getDataOutputStreamC、sock.getOutputStreamD、new DataOutputStream(sock)
考题
Which constructs a DataOutputStream?() A、 New dataInputStream(“in.txt”);B、 New dataInputStream(new file(“in.txt”));C、 New dataInputStream(new writer(“in.txt”));D、 New dataInputStream(new FileWriter(“in.txt”));E、 New dataInputStream(new InputStream(“in.txt”));F、 New dataInputStream(new FileInputStream(“in.txt”));
考题
DataInputStream与DataOutputStream的特点()A、读写数据时与具体的机器无关B、读写数据时与具体的机器有关C、读数据时与机器有关,而写数据时与机器无关D、读数据时与机器无关,而写数据时与机器有关
考题
如果我们想实现“先把要写入文件的数据先缓存到内存中,再把缓存中的数据写入文件中”的功能时,则需要使用下列哪个类?()A、 FileReaderB、 OutputStreamC、 FilterOutputStreamD、 DataOutputStream
考题
下面哪些是FilterInputStream的直接子类()。A、BufferedInputStreamB、InputStreamReaderC、ObjectInputStreamD、ByteArrayInputStreamE、DataInputStream
考题
Which constructs a DataOutputStream?()A、 New dataOutputStream(“out.txt”);B、 New dataOutputStream(new file(“out.txt”));C、 New dataOutputStream(new writer(“out.txt”));D、 New dataOutputStream(new FileWriter(“out.txt”));E、 New dataOutputStream(new OutputStream(“out.txt”));F、 New dataOutputStream(new FileOutputStream(“out.txt”));
考题
单选题Which constructs a DataOutputStream?()A
New dataOutputStream(“out.txt”);B
New dataOutputStream(new file(“out.txt”));C
New dataOutputStream(new writer(“out.txt”));D
New dataOutputStream(new FileWriter(“out.txt”));E
New dataOutputStream(new OutputStream(“out.txt”));F
New dataOutputStream(new FileOutputStream(“out.txt”));
考题
单选题在下列程序的空白处,应填入的正确选项是( )。import java.io.*;
public class writeInt{
public static void main(String[] args){
int[] myArray={10,20,30,40};
try{
DataOutputStream dos=new DataOutputStream(new FileOutputStream("ints.dat"));
for(int i=0;i
dos.writeInt(myArray[i]);
dos.close();
System.out.println("Have written binary file ints.dat");
}
}
catch(IOException ioe){
System.out.println("IOException");
}
}
}A
start()B
close()C
read()D
write()
考题
单选题在j2ee中,某一Java程序中有如下代码: DataInputStream din =new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat"))); System.out.print(din.readByte()); 假设在employee.dat文件中只有如下一段字符:abcdefg.则:System.out在屏幕上打印()A
aB
bC
97D
98
考题
多选题在J2EE中,下面代码中,()不会编译错误。AFile f = new File(/,autoexec.bat);BDataInputStream din = new DataInputStream(new FileInputStream(autoexec.bat));CInputStreamReader in = new InputStreamReader(System.in);DOutputStreamWriter out = new OutputStreamWriter(System.in);
考题
单选题在J2EE中,在提供名为sock的套接字实例的前提下,为了后去通过套接字进行通信的输出流,你可以编写()A
sock.accept()B
sock.getDataOutputStreamC
sock.getOutputStreamD
new DataOutputStream(sock)
考题
单选题Which constructs a DataOutputStream?()A
New dataInputStream(“in.txt”);B
New dataInputStream(new file(“in.txt”));C
New dataInputStream(new writer(“in.txt”));D
New dataInputStream(new FileWriter(“in.txt”));E
New dataInputStream(new InputStream(“in.txt”));F
New dataInputStream(new FileInputStream(“in.txt”));
考题
单选题What writes the text “ ” to the end of the file “file.txt”?()A
OutputStream out= new FileOutputStream (“file.txt”); Out.writeBytes (“ /n”);B
OutputStream os= new FileOutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);C
OutputStream os= new FileOutputStream (“file.txt”); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);D
OutputStream os= new OutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);
考题
单选题Java类库中,将信息写入内存的类是( )。A
java.io.FileOutputStreamB
java.io.ByteArrayOutputStreamC
java.io.BufferedOutputStreamD
java.io.DataOutputStream
考题
单选题如果我们想实现“先把要写入文件的数据先缓存到内存中,再把缓存中的数据写入文件中”的功能时,则需要使用下列哪个类?()A
FileReaderB
OutputStreamC
FilterOutputStreamD
DataOutputStream
热门标签
最新试卷