Which line completes this code fragment to define a text file named txtfile for reading? ____________________________________________________
String line = scan.nextLine() ;
A) Reader scan = new Reader(new File("txtfile") ) ;
B) FileReader scan = new File("txtfile") ;
C) Scanner scan = new Scanner(System.in) ;
D) Scanner scan = new Scanner(new File("txtfile") ) ;
Correct Answer:
Verified
Q2: Which of the following statements enables you
Q3: Which class is used for input of
Q4: Which of the following reads binary data
Q5: You use _ and FileOutputStream objects to
Q6: Which file storage method is in human-readable
Q7: Which is an advantage of storing numbers
Q8: The _ class is used when writing
Q9: Which file storage method stores data in
Q10: A byte is composed of _ bits
Q11: To read text data from a disk
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