103k views
2 votes
Which of the following statements are true? Select all that apply.A. Since ObjectInputStream/ObjectOutputStream contains all the functions of DataInputStream/DataOutputStream, you can replace DataInputStream/DataOutputStream completely by ObjectInputStream/ObjectOutputStream. B. If all the elements in an array is serializable, the array is serializable too. C. To write an object, the object must be serializable. D. ObjectInputStream/ObjectOutputStream enables you to perform I/O for objects in addition for primitive type values and strings. E. The Serializable interface does not contain any methods. So it is a marker interface.

User Vicktoria
by
5.9k points

1 Answer

5 votes

Answer:

Correct options are A, B, D, E

Step-by-step explanation:

For option A, D, E:

reference :Book: Object Oriented Programming with Java

chapter 5 and section 5.4 Object I/O

for option 'C' it incorrect statement because to write an object it is not necessary to be serialize.

for option B it is correct because if all attributes of array having type T then we can say array is of type T implying the same statement for serialization.