Solved

Which Line Completes This Code Fragment So It Creates a Text

Question 75

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