Solved

Which Line Completes This Code Fragment So It Creates a Text

Question 12

Multiple Choice

Which line completes this code fragment so it creates a text file called "mychars.txt" and writes the characters 'A', 'B', and 'C' into the file? _____________________
Fw) write('A') ;
Fw) write('B') ;
Fw) write('C') ;


A) PrintWriter fw = new PrintWriter("mychars.txt") ;
B) FileOutputStream fw = new FileOutputStream("mychars.txt") ;
C) File fw = new File("mychars.txt") ;
D) PrintStream fw = new PrintStream("mychars.txt") ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents