CMS专题

单选题Which constructs a DataOutputStream?()ANew dataOutputStream(“out.txt”);BNew dataOutputStream(new file(“out.txt”));CNew dataOutputStream(new writer(“out.txt”));DNew dataOutputStream(new FileWriter(“out.txt”));ENew dataOutputStream(new OutputStream(“out.

题目
单选题
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”));

参考答案和解析
正确答案: A
解析: 暂无解析
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Java 类库中,将信息写入内存的类是

A ) java.io.FileOutputStream

B ) java.io.ByteArrayOutputStream

C ) java.io.BufferedOutputStream

D ) java.io.DataOutputStream


正确答案:B

第2题:

Thesystemanalystshaverequestedheavyuseofobjectfeatures.ThedatabasedesignmakesuseofPL/SQL8objecttypes,methods,andLOBtypes.Howdoyouworkwiththesefeaturesontheclient?()

A.Writeclient-sidesubprogramscontainingthePL/SQL8constructs,andmovethemintoanobjectgroup.

B.Writeserver-sidesubprograms,andcallthesubprogramsfromtheformapplication.

C.StorethePL/SQL8constructsinaPL/SQLlibrary,andattackthelibrarytoeachformmuddleinyourapplication.


参考答案:B

第3题:

Structured programming practices(71)rise to Pascal,in which constructs were introduced to make programs more readable and better(72). C provided a combination of assembly language and high-level Structure to create a general-purpose language that could be used from system to(73)programming. Next came object orientation,which is(74)of a methodology and design philosophy than a language issue.This is(75)by the addition of so-called OO extensions to current languages,such as C.

A.giving

B.given

C.gave

D.gives


正确答案:C

第4题:

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”));

正确答案:F

第5题:

Java类库中,将信息写入内存的类是( )。

A.java.io.FileOutputStream

B.java.io.ByteArrayOutputStream

C.java.io.BufferedOutputStream

D.j ava.io.DataOutputStream


正确答案:B
在java.i0中,提供了ByteArrayInput-Stream、ByteArrayOutputStream和StringBufferInputStream类可以直接访问内存,其中用ByteArrayOutputStream可以向字节数组(缓冲区)写入数据。.

第6题:

dataoutputstream类的文件流能够把各种基本类型的数据写入到二进制数据文件中。()

此题为判断题(对,错)。


正确答案:正确

第7题:

Structured programming practices(71)rise to Pascal, in which constructs were introduced to make programs more readable and better(72)C provided a combination of assembly and high -level structure to create a general -purpose language that could be used from system to(73)programming. Next came object orientation, which is(74)of a metrology and design philosophy than a language issue. This is(75)by the addition of so - called OO extensions to current language, such as C++.

A.giving

B.given

C.gave

D.gives


正确答案:C

第8题:

阅读下面程序

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;i<myArray.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)FileOutputStream

B)ByteArrayOutputStream

C)BufferedOutputStream

D)FileWriter


正确答案:A

第9题:

在J2EE中,在提供名为sock的套接字实例的前提下,为了后去通过套接字进行通信的输出流,你可以编写() 

  • A、sock.accept()
  • B、sock.getDataOutputStream
  • C、sock.getOutputStream
  • D、new DataOutputStream(sock)

正确答案:C

第10题:

Which constructs a BufferedIputStream?()

  • A、 New BufferedInputStream(“in.txt”);
  • B、 New BufferedInputStream(new File(“in.txt”));
  • C、 New BufferedInputStream(Writer(“in.txt”));
  • D、 New BufferedInputStream(new Writer(“in.txt”));
  • E、 New BufferedInputStream(new InputStream(“in.txt”));
  • F、 New BufferedInputStream(new FileInputStream(“in.txt”));

正确答案:F

更多相关问题