Insert the missing code in the following code fragment. This fragment is intended to write an output file named dataOut.txt that resides in a folder named reports on the C: drive of a Windows system.
Public static void main(String[] args) throws IOException
{
PrintWriter outputFile = _______;
) . .
}
A) new PrintWriter("c:/reports/dataOut.txt")
B) new PrintWriter("c://reports//dataOut.txt")
C) new PrintWriter("c:\reports\dataOut.txt")
D) new PrintWriter("c:\\reports\\dataOut.txt")
Correct Answer:
Verified
Q22: Insert the missing code in the following
Q26: Which return value of the JFileChooser object's
Q27: Insert the missing code in the following
Q30: Consider the following code snippet. Scanner inputFile
Q30: Insert the missing code in the following
Q32: Which method of the JFileChooser object will
Q33: Your program wishes to open a file
Q35: Consider the following code snippet. PrintWriter outFile
Q37: Your program must read in an existing
Q38: Which of the following statements about using
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents