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:

Verified
Correct Answer:
Verified
Q70: Assume we have a RandomAccessFile object, file,
Q71: Which of the following statements enables you
Q72: _ access allows file access at arbitrary
Q73: Which is not a method in the
Q74: The _ method returns an integer, either
Q76: The readInt and writeInt methods of the
Q77: Which method in the RandomAccessFile class provides
Q78: Which of the following classes are used
Q79: In which package are most classes for
Q80: Which method moves the file pointer in