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
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
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
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
b) toad
c) JDBC template
d) mysql
View Answer
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
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
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
Explanation: Firebug integrates with firefox and enables to edit, debug and monitor CSS, HTML and javascript of any web page.
8. What type of protocol is HTTP?
a) stateless
b) stateful
c) transfer protocol
d) information protocol
View Answer
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
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
View Answer
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.
- Apply for Computer Science Internship
- Check Programming Books
- Practice BCA MCQs
- Practice Programming MCQs
- Apply for Java Internship