Web Design and Development MCQs with Answers
Practice important Web Design and Development MCQs with answers and explanations.
Multiple Choice Questions
Q501: What does the data layer in the Address Book case study interact with?
- A: User interface
- B: Business logic
- C: Database
- D: Presentation layer
View Answer
C
Q502: What is the purpose of the PersonDAO class in the Address Book case study?
- A: To display data
- B: To interact with the database
- C: To manage user sessions
- D: To handle HTTP requests
View Answer
B
Q503: Which layer is responsible for handling transactions in the Address Book case study?
- A: Presentation Layer
- B: Data Layer
- C: Business Layer
- D: Network Layer
View Answer
C
Q504: What method in the PersonDAO class retrieves a person's information?
- A: searchPerson
- B: updatePerson
- C: deletePerson
- D: insertPerson
View Answer
A
Q505: What does the SearchPersonServlet do?
- A: Displays a form for user input
- B: Retrieves data from the database
- C: Updates user information
- D: Deletes user records
View Answer
A
Q506: What Java class is used to represent a person in the Address Book case study?
- A: PersonDAO
- B: PersonInfo
- C: SearchPersonServlet
- D: ShowPersonServlet
View Answer
B
Q507: In Java, what is the purpose of a package?
- A: To organize classes into directories
- B: To increase execution speed
- C: To manage database connections
- D: To handle user input
View Answer
A
Q508: How is a package created in Java?
- A: By using the 'import' keyword
- B: By specifying the 'package' keyword in the source file
- C: By compiling the code
- D: By setting the CLASSPATH variable
View Answer
B
Q509: Which package is used to avoid class name collision in Java?
- A: java.util
- B: world
- C: com.mycompany
- D: All of the above
View Answer
D
Q510: What is the main advantage of JSP over servlets?
- A: JSPs offer better language for dynamic content
- B: JSPs are slower than servlets
- C: JSPs do not support HTML
- D: JSPs cannot be used with Java code
View Answer
A