This set of Advanced Java Multiple Choice Questions & Answers (MCQs) focuses on “Web application”.
1. Servlet are used to program which component in a web application?
Explanation: A servlet class extends the capabilities of servers that host applications which are accessed by way of a request-response programming model.
2. Which component can be used for sending messages from one application to another?
Explanation: Messaging is a method of communication between software components or applications. MQ can be used for passing message from sender to receiver.
3. How are java web applications packaged?
d) both jar and war
Explanation: war are deployed on apache servers or tomcat servers. With Spring boot and few other technologies tomcat is brought on the machine by deploying jar.
4. How can we connect to database in a web application?
a) oracle sql developer
c) JDBC template
Explanation: JDBC template can be used to connect to database and fire queries against it.
5. How can we take input text from user in HTML page?
a) input tag
b) inoutBufferedReader tag
c) meta tag
d) scanner tag
Explanation: HTML provides various user input options like input, radio, text, etc.
7. Which of the below can be used to debug front end of a web application ?
8. What type of protocol is HTTP?
c) transfer protocol
d) information protocol
Explanation: HTTP is a stateless protocol. It works on request and response mechanism and each request is an independent transaction.
9. What does MIME stand for?
a) Multipurpose Internet Messaging Extension
b) Multipurpose Internet Mail Extension
c) Multipurpose Internet Media Extension
d) Multipurpose Internet Mass Extension
Explanation: MIME is an acronym for Multi-purpose Internet Mail Extensions. It is used for classifying file types over the Internet. It contains type/subtype e.g. application/msword.
10. What is the storage capacity of single cookie?
a) 2048 MB
b) 2048 bytes
c) 4095 bytes
d) 4095 MB
Explanation: Storage capacity of cookies is 4095 bytes/cookie.
Sanfoundry Global Education & Learning Series – Java Programming Language.
To practice all features of Java programming language, here is complete set on 1000+ Multiple Choice Questions and Answers on Java.