Java MCQ Question and Answer
Java MCQ Question and Answer
21. Which of the following are true?
a)The Serializable interface is used to identify objects that may be written to an output stream.
b)The Externalizable interface is implemented by classes that control the way in which their objects are serialized.
c)The Serializable interface extends the Externalizable interface.
d)The Externalizable interface extends the Serializable interface.
- a,b&d
- a,c&d
- b,c&a
- d,c&a
22. Which of the following are true about the File class?
a)A File object can be used to access the files in the current directory.
b)When a File object is created, a corresponding directory or file is created in the local file system.
c)File objects are used to access files and directories on the local file system.
d)File objects can be garbage collected.
- a,c&d
- a,b&c
- b,c&d
- c,a&b