Advanced Java Questions & Answers – Web application

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?
a) client
b) server
c) tomcat
d) applet
View Answer

Answer: b
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?
a) server
b) client
c) mq
d) webapp
View Answer

Answer: c
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?
a) jar
b) war
c) zip
d) both jar and war
View Answer

Answer: d
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.
advertisement
advertisement

4. How can we connect to database in a web application?
a) oracle sql developer
b) toad
c) JDBC template
d) mysql
View Answer

Answer: c
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
View Answer

Answer: a
Explanation: HTML provides various user input options like input, radio, text, etc.

6. Which of the below is not a javascript framework for UI?
a) Vaadin
b) AngularJS
c) KendoUI
d) Springcore
View Answer

Answer: d
Explanation: Springcore is not a javascript framework. It is a comprehensive programming and configuration model for enterprise applications based on java.

7. Which of the below can be used to debug front end of a web application?
a) Junit
b) Fitnesse
c) Firebug
d) Mockito
View Answer

Answer: c
Explanation: Firebug integrates with firefox and enables to edit, debug and monitor CSS, HTML and javascript of any web page.
advertisement

8. What type of protocol is HTTP?
a) stateless
b) stateful
c) transfer protocol
d) information protocol
View Answer

Answer: a
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
View Answer

Answer: b
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.
advertisement

10. What is the storage capacity of single cookie?
a) 2048 MB
b) 2048 bytes
c) 4095 bytes
d) 4095 MB
View Answer

Answer: c
Explanation: Storage capacity of cookies is 4095 bytes/cookie.

Sanfoundry Global Education & Learning Series – Java Programming Language.

To practice all areas of Java language, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.