Your program wishes to open a file named C:\java\myProg\input.txt on a Windows system.Which of the following is the correct code to do this?
A) inputFile = new File("c:\java\myProg\input.txt") ;
B) inputFile = new File.open("c:\\java\\myProg\\input.txt") ;
C) inputFile = new File("c:\\java\\myProg\\input.txt") ;
D) inputFile = new File.open("c:\java\myProg\input.txt") ;
Correct Answer:
Verified
Q28: Insert the missing code in the following
Q29: Consider the following code snippet.
Scanner inputFile =
Q30: Insert the missing code in the following
Q31: Assuming that inputFile is a Scanner object
Q32: Which of the following statements about character
Q34: Which return value of the JFileChooser object's
Q35: Consider the following code snippet.
PrintWriter outputFile =
Q36: Consider the following code snippet.
Scanner inputFile =
Q37: Your program must read in an existing
Q38: Which of the following statements about reading
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