Learn J2EE MCQs

Prepare J2EE MCQs (Multiple choice Questions) for exam and job interviews.

What does the J2EE pattern `MVC` stand for?

1) Model View Controller

2) Module Variable Configuration

3) Multi-Version Control

4) Meta View Compiler

Answer : Model View Controller

What does `JSP` stand for in J2EE?

1) Java Standard Page

2) Java Servlet Page

3) Java Server Pages

4) JavaScript Pages

Answer : Java Server Pages

Which protocol is used for object communication in J2EE?

1) HTTP

2) RMI

3) SOAP

4) TCP

Answer : RMI

Which of the following is a benefit of J2EE?

1) Platform independence

2) Limited scalability

3) Increased overhead

4) Slow execution

Answer : Platform independence

What is the use of the `init()` method in a servlet?

1) To initialize the servlet

2) To handle requests

3) To return responses

4) To destroy the servlet

Answer : To initialize the servlet

Which of the following is NOT an enterprise JavaBean type?

1) Session Bean

2) Entity Bean

3) Message-Driven Bean

4) Connection Bean

Answer : Connection Bean

What is the function of the `doGet()` method in a servlet?

1) Handles HTTP GET requests

2) Handles HTTP POST requests

3) Manages servlet lifecycle

4) Closes the servlet

Answer : Handles HTTP GET requests

Which of the following is used for database access in J2EE?

1) JDBC

2) JTA

3) JMS

4) JSP

Answer : JDBC

Which element in web.xml defines a servlet?

1) <servlet>

2) <context-param>

3) <listener>

4) <filter>

Answer : <servlet>

Which J2EE technology supports messaging between distributed systems?

1) JMS

2) JSP

3) JDBC

4) EJB

Answer : JMS