Java: KIỂM TRA KIẾN THỨC JAVA IO


Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên

QUESTIONS

1. Which of the following are true about stream classes?

(A)

They help read input from a stream.

(B)

Input and Output streams are used for reading and writing of structured sequence of bytes.

(C)

They help manage disk files.

(D)

All classes that work on streams directly works with files and the file system.

Choose answer:

(A)

A, C

(C)

C

(B)

B

(D)

D

2. The File(String dirpath) constructor______________________________________ _.

(A)

Creates a File object with pathname of the file specified by the String variable dirpath into an abstract pathname.

(B)

Creates a File object with pathname of the file specified by the String variables parent and child.

(C)

Creates a new File instance from another File object specified by the variable fileObj.

(D)

Converts the given file: URI into an abstract pathname and creates a new File

instance.

Choose answer:

(A)

A

(C)

C

(B)

B

(D)

D

3. Which of the following classes create a FileInputStream or FileOutputStream to contain it?

(A)

System

(B)

File

(C)

FileDescriptor

(D)

FilenameFilter

Choose answer:

(A)

A

(C)

C

(B)

B

(D)

D

4. The sync method__________________ _.

(A)

Creates an (invalid) FileDescriptor object

(B)

Checks whether the file descriptor is valid

(C)

Reads bytes from a binary stream

(D)

Clears the system buffers and writes the content that they contain to the actual hardware

Choose answer:

(A)

A

(C)

C

(B)

B

(D)

D

5. Identify the methods in the DataInput interface.

(A)

delete()

(B)

renameTo()

(C)

toPath()

(D)

readBoolean()

Choose answer:

(A)

A

(C)

C

(B)

B

(D)

D

6. What is the process of saving data to some permanent storage called?

(A)

Serialization

(B)

Persistence

(C)

Deserialization

(D)

Append mode

Choose answer:

(A)

A

(C)

C

(B)

B

(D)

D

» Tiếp: Câu hỏi và bài tập phần java.io file
« Trước: Java DOM Parser - Đọc, tạo, sửa tài liệu XML
Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên
Copied !!!