Multiple Choice
Which code stores an array buttonArray of JButton objects in a file named buttonFile? We ignore exceptions in this problem.
A) ObjectStream os = new ObjectStream(new FileStream("buttonFile") ;
Os) writeObject(buttonArray) ;
B) ObjectOutputStream oos = new ObjectOutputStream(
New FileOutputStream("buttonFile") ;
Oos) writeObject(buttonArray) ;
C) ObjectOutputStream oos = new ObjectOutputStream(
New FileOutputStream("buttonFile") ;
Oos) writeObject(buttonArray[0]) ;
D) ObjectOutputStream oos = new ObjectOutputStream("buttonFile") ;
Oos) writeObject(buttonArray) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q57: When storing numbers in a file with
Q58: To read text data from a disk
Q59: Which class is used for input of
Q60: A file pointer is a position in
Q61: In which of the following modes can
Q63: How many bytes does the read method
Q64: Which file storage method stores data in
Q65: Which interface allows classes to be written
Q66: Which class is used for input of
Q67: Given a RandomAccessFile that stores a set