Exam 10: File IO

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When the method readLine)tries to read beyond the end of a file,it returns the value of:

(Multiple Choice)
4.9/5
(26)

Write a Java statement to create an input stream to a file named autos.txt.Use the BufferedReader class.

(Essay)
4.8/5
(36)

Write a complete Java program that opens a binary file containing integers and displays the contents to the screen.

(Essay)
4.9/5
(41)

Use the output stream to the file autos.txt created above in number 2 to write the line "Mercedes" to the file.

(Essay)
4.7/5
(36)

The output stream connected to the computer screen is:

(Multiple Choice)
4.9/5
(36)

A __________ path name gives the path to a file,starting with the directory that the program is in.

(Multiple Choice)
4.8/5
(44)

Write a Java statement that creates an output stream to append data to a file named autos.txt.

(Essay)
4.9/5
(30)

A full path name gives a complete path name,starting from the directory the program is in.

(True/False)
4.9/5
(31)

Binary files store data in the same format that is used by any common text editor.

(True/False)
4.8/5
(41)

The scanner class has a series of methods that checks to see if there is any more well-formed input of the appropriate type.These methods are called __________ methods:

(Multiple Choice)
4.7/5
(38)

Explain the differences between a text file,an ASCII file and a binary file.

(Essay)
4.9/5
(35)

All of the following are methods of the Scanner class except:

(Multiple Choice)
4.9/5
(31)

The FileNotFoundException is a descendant of the class IOException.

(True/False)
4.9/5
(37)

What happens when the method close is invoked on a stream?

(Essay)
4.7/5
(35)

In Java,when you open a text file you should account for a possible:

(Multiple Choice)
4.9/5
(36)

There are two common classes used for reading from a text file.They are:

(Multiple Choice)
4.8/5
(35)

All of the following are methods of the File class except:

(Multiple Choice)
4.8/5
(32)

An ___________ allows data to flow into your program.

(Multiple Choice)
4.8/5
(37)

The preferred stream classes for processing binary files are ObjectInputStream and ObjectOutputStream.

(True/False)
4.9/5
(31)

The method _________ reads a single character from an input stream.

(Multiple Choice)
4.8/5
(39)
Showing 21 - 40 of 46
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)