Sail E0 Webinar

MCQs

Total Questions : 20 | Page 2 of 2 pages
Question 11.

Which of these is a method of ObjectInput interface used to deserialize an object from a 

stream?


  1.    int read()
  2.    void close()
  3.    Object readObject()
  4.    Object WriteObject()
 Discuss Question
Answer: Option C. -> Object readObject()

 None.


Question 12.

Which of these is an interface for control over serialization and deserialization?


  1.    Serializable
  2.    Externalization
  3.    FileFilter
  4.    ObjectInput
 Discuss Question
Answer: Option B. -> Externalization

None.


Question 13.

Which of these is a method of ObjectOutput interface used to finalize the output state 

so that any buffers are cleared?


  1.    clear()
  2.    flush()
  3.    fflush()
  4.    close()
 Discuss Question
Answer: Option B. -> flush()

None.


Question 14.

Which of these interface extends DataInput interface?


  1.    Serializable
  2.    Externalization
  3.    ObjectOutput
  4.    ObjectInput
 Discuss Question
Answer: Option D. -> ObjectInput

ObjectInput interface extends the DataInput interface and supports object serialization.


Question 15.

Which of these interface extends DataOutput interface?


  1.    Serializable
  2.    Externalization
  3.    ObjectOutput
  4.    ObjectInput
 Discuss Question
Answer: Option C. -> ObjectOutput

ObjectOutput interface extends the DataOutput interface and supports object serialization.


Question 16.

Which of these is an interface for control over serialization and deserialization?


  1.    Serializable
  2.    Externalization
  3.    FileFilter
  4.    ObjectInput
 Discuss Question
Answer: Option B. -> Externalization

None.


Question 17.

Which of these process occur automatically by java run time system?


  1.    Serialization
  2.    Memory allocation
  3.    Deserialization
  4.    All of the mentioned
 Discuss Question
Answer: Option D. -> All of the mentioned

Serialization, deserialization and Memory allocation occur automatically by java run time system.


Question 18.

Which of these is a process of extracting/removing the state of an object from a stream?


  1.    Serialization
  2.    Externalization
  3.    File Filtering
  4.    Deserialization
 Discuss Question
Answer: Option D. -> Deserialization

Deserialization is a process by which the data written in the stream can be extracted out from 

the stream.


Question 19.

Which of these is a process of writing the state of an object to a byte stream?


  1.    Serialization
  2.    Externalization
  3.    File Filtering
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> Serialization

Serialization is the process of writing the state of an object to a byte stream. This is used when 

you want to save the state of your program to persistent storage area.


Question 20.

Which of these process occur automatically by java run time system?


  1.    Serialization
  2.    Garbage collection
  3.    File Filtering
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> Serialization

Serialization and deserialization occur automatically by java run time system, Garbage 

collection also occur automatically but is done by CPU or the operating system not by 

the java run time system.


Latest Videos

Latest Test Papers