Web Design and Development MCQs with Answers
Practice important Web Design and Development MCQs with answers and explanations.
Chapter: 24
Q381:
What does the join() method do in Java?
A. It makes the current thread wait for another thread to complete
B. It starts a new thread
C. It stops the execution of the current thread
D. It increases the priority of the thread
Correct Answer:
A
Chapter: 25
Q382:
A ___________ defines the way and method of communication between two parties.
A. Compiler
B. Protocol
C. Tool
D. Technique
Correct Answer:
B
Chapter: 25
Q383:
What is the output of the DelayEx class?
A. The main thread goes to sleep and then resumes
B. The main thread immediately finishes execution
C. The main thread throws an exception
D. The main thread prints an error message
Correct Answer:
A
Chapter: 25
Q384:
What is the correct way to instantiate a Thread object with a Runnable task?
A. new Thread(new Task())
B. new Task(new Thread())
C. new Task()
D. new Thread()
Correct Answer:
A
Chapter: 25
Q385:
Which method is used to handle interruptions during sleep?
A. sleep()
B. yield()
C. run()
D. join()
Correct Answer:
A
Chapter: 25
Q386:
What is the primary purpose of a web application?
A. To facilitate remote user interactions
B. To manage local file systems
C. To perform offline calculations
D. To handle hardware resources
Correct Answer:
A
Chapter: 25
Q387:
What protocol is commonly used for web communication between client and server?
A. FTP
B. HTTP
C. SMTP
D. TCP
Correct Answer:
B
Chapter: 25
Q388:
What is a key characteristic of HTTP communication?
A. Stateless request-response model
B. Continuous data stream
C. Persistent connection
D. Binary data transfer
Correct Answer:
A
Chapter: 25
Q389:
What is contained in the body of an HTTP request?
A. Data sent by the client
B. Status code of the response
C. Server configuration details
D. Client software version
Correct Answer:
A
Chapter: 25
Q390:
What does the HTTP status code 404 indicate?
A. Resource not available
B. Request requires authentication
C. Resource moved permanently
D. Server error
Correct Answer:
A
Chapter: 25
Q391:
Which HTTP status code signifies a successful request?
A. 200
B. 301
C. 404
D. 503
Correct Answer:
A
Chapter: 25
Q392:
What is the main difference between static and dynamic web pages?
A. Static pages do not change based on user input, while dynamic pages do
B. Static pages are slower to load than dynamic pages
C. Dynamic pages are simpler than static pages
D. Static pages require server-side scripting, while dynamic pages do not
Correct Answer:
A
Chapter: 25
Q393:
Why might a website use dynamic web pages?
A. To provide content that changes based on user input or database data
B. To serve fixed content that doesn’t change
C. To reduce server load
D. To limit user interaction
Correct Answer:
A
Chapter: 25
Q394:
What are the primary functions of the Presentation Layer in a web application?
A. Provides a user interface for client interaction
B. Manages business logic and transactions
C. Represents real-world business objects
D. Handles server-side scripting
Correct Answer:
A
Chapter: 25
Q395:
Which layer of a web application is responsible for managing business logic?
A. Presentation Layer
B. Business Layer
C. Data Layer
D. Communication Layer
Correct Answer:
B
Chapter: 25
Q396:
What is one example of technology used for dynamic web content?
A. HTML
B. CSS
C. PHP
D. XML
Correct Answer:
C
Chapter: 25
Q397:
What does the URI in an HTTP request specify?
A. The address of the required document or resource
B. The method of communication
C. The response status code
D. The server's hardware specifications
Correct Answer:
A
Chapter: 26
Q398:
What is the function of HTTP response headers?
A. To provide client information about the server
B. To display the web page content
C. To send data to the server
D. To handle client-side errors
Correct Answer:
A
Chapter: 26
Q399:
In which state is a thread when it has just been created but not yet started?
A. New state
B. Ready state
C. Running state
D. Dead state
Correct Answer:
A
Chapter: 26
Q400:
What does the sleep(int time) method do in Java?
A. Causes the thread to wait for a specified time
B. Immediately terminates the thread
C. Increases the thread’s priority
D. Allows the thread to execute in parallel
Correct Answer:
A