Skip to main content

Web Design and Development MCQs with Answers

Practice important Web Design and Development MCQs with answers and explanations.

Multiple Choice Questions

Q251: In java, threads can be created by implementing which of the following?
  • A: Runnable Interface
  • B: Abstract class
  • C: Runnable Interface or Extending Thread Class
  • D: Extending Thread class
View Answer
C

Q252: If the start method is not called, what happens?
  • A: Nothing will happen
  • B: Thread will be created
  • C: Thread will be created but not executed
  • D: Thread will run immediately
View Answer
C

Q253: _______ is the process of storing the state of an object in a byte stream.
  • A: Encapsulation
  • B: Abstraction
  • C: Serialization
  • D: None of the above
View Answer
C

Q254: Which of these classes are used for handling binary data?
  • A: FileOutputStream
  • B: DataInputStream
  • C: ObjectOutputStream
  • D: All of the above
View Answer
D

Q255: What happens if a java object is serialized to a file that already exists?
  • A: Exception is thrown
  • B: File is overwritten
  • C: File is deleted
  • D: None of the above
View Answer
B

Q256: What is the extension of the file created by ObjectOutputStream?
  • A: .txt
  • B: .java
  • C: .ser
  • D: .out
View Answer
C

Q257: ________ is the method of writing objects to a file.
  • A: write()
  • B: writeObject()
  • C: writeStream()
  • D: None of the above
View Answer
B

Q258: ___________ is used to get an object from a file
  • A: read()
  • B: readObject()
  • C: readStream()
  • D: None of the above
View Answer
B

Q259: What happens if we try to deserialize a file that contains more than one object?
  • A: Only the first object is deserialized
  • B: All objects are deserialized
  • C: Only the last object is deserialized
  • D: Exception is thrown
View Answer
B

Q260: __________ is a process of getting an object from a file.
  • A: writeObject()
  • B: readObject()
  • C: read()
  • D: None of the above
View Answer
B

Test Your Knowledge

Take a timed quiz on Web Design and Development

🚀 Start Quiz Now