Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt that resides in a folder named payroll on the C: drive of a Windows system.
Public static void main(String[] args) throws FileNotFoundException
{
File inputFile = ________;
Scanner in = new Scanner(inputFile) ;
) . .
}
A) new File(c:/payroll/"dataIn.txt")
B) new File(c://payroll//"dataIn.txt")
C) new File("c:\payroll\dataIn.txt")
D) new File("c:\\payroll\\dataIn.txt")
Correct Answer:

Verified
Correct Answer:
Verified
Q25: Which statement about handling exceptions is true?<br>A)
Q30: Consider the following code snippet. Scanner inputFile
Q54: Insert the missing code in the following
Q58: Under which condition will the PrintWriter constructor
Q59: Which of the following patterns should be
Q60: Consider the following code snippet. PrintWriter outFile
Q67: Which of the following objects should be
Q94: An example of a fatal error that
Q102: Consider the following code snippet. PrintWriter outputFile
Q106: Which of the following statements about checked