Multiple Choice
Select an expression to complete the program segment below, which is designed to read data from a file whose name is specified as the first command line argument. If no command line arguments are given, the program reads data from the default.txt file. String fileName = "default.txt";
If ( ________________________ )
{
FileName = args[0];
}
// additional statements to open file and read data
A) args > 0
B) args[0] != null
C) args.length >= 0
D) args.length > 0
Correct Answer:

Verified
Correct Answer:
Verified
Q99: The PrintWriter class is an enhancement of
Q100: When a program throws an exception within
Q101: Consider the following code snippet: Scanner in
Q102: Consider the following code snippet. PrintWriter outputFile
Q103: When reading words using a Scanner object's
Q105: Which of the following statements about command
Q106: Consider the following code snippet: public void
Q107: Select an expression to complete the following
Q108: Consider the following code snippet: PrintWriter out
Q109: Consider the following code snippet: Scanner in