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

Q101: What is a key feature of the AddressBook class in the example?
  • A: It uses an ArrayList to store records
  • B: It uses a HashMap to store records
  • C: It supports fixed-size records
  • D: It requires explicit size management
View Answer
A

Q102: How does the AddressBook class perform searching?
  • A: By iterating over the ArrayList
  • B: By using a HashMap
  • C: By directly accessing elements
  • D: By using a LinkedList
View Answer
A

Q103: What does the print() method in the PersonInfo class do?
  • A: Prints details to the console
  • B: Displays details in a message dialog box
  • C: Writes details to a file
  • D: Logs details to a database
View Answer
B

Q104: How are records stored in the AddressBook class?
  • A: As instances of the PersonInfo class
  • B: As strings
  • C: As integers
  • D: As key-value pairs
View Answer
A

Q105: What are the three main types of errors in software development?
  • A: Syntax, Logic, Runtime
  • B: Syntax, Compilation, Runtime
  • C: Syntax, Logic, Compilation
  • D: Syntax, Compilation, Debugging
View Answer
A

Q106: What is an exception in Java?
  • A: A method that handles errors
  • B: A runtime error that stops program execution
  • C: A runtime event wrapped as an object
  • D: A syntax error detected during compilation
View Answer
C

Q107: Which of the following is an example of a runtime error?
  • A: Division by zero
  • B: Invalid method call
  • C: Missing class file
  • D: Uninitialized variable
View Answer
A

Q108: What does the 'finally' block in Java do?
  • A: It executes only if an exception is thrown
  • B: It always executes regardless of whether an exception is thrown
  • C: It executes before the 'try' block
  • D: It executes after the 'catch' block
View Answer
B

Q109: What keyword is used to manually throw an exception in Java?
  • A: catch
  • B: throw
  • C: throws
  • D: final
View Answer
B

Q110: In Java, what does the 'throws' keyword do?
  • A: It catches an exception
  • B: It declares that a method might throw an exception
  • C: It handles an exception
  • D: It creates a new exception
View Answer
B

Test Your Knowledge

Take a timed quiz on Web Design and Development

🚀 Start Quiz Now