Learn J2EE MCQs

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

Which method in a servlet handles HTTP POST requests?

1) doGet()

2) service()

3) init()

4) doPost()

Answer : doPost()

What is the use of `JMS` in J2EE?

1) For sending email notifications

2) For handling asynchronous messaging

3) For rendering dynamic content

4) For database transactions

Answer : For handling asynchronous messaging

Which of the following describes `hot deployment` in J2EE?

1) The process of deploying an application without stopping the server

2) The process of compiling Java code

3) The process of stopping an application

4) The process of running background tasks

Answer : The process of deploying an application without stopping the server

Which design pattern in J2EE is used to control client access to an object?

1) Front Controller

2) Singleton

3) Proxy

4) Adapter

Answer : Proxy

What does `JDBC` stand for?

1) Java Database Connectivity

2) Java Database Compiler

3) Java Directory Compiler

4) Java Debug Connector

Answer : Java Database Connectivity

Which of the following is NOT a type of session bean in J2EE?

1) Stateless Session Bean

2) Stateful Session Bean

3) Message-Driven Bean

4) Singleton Bean

Answer : Singleton Bean

What is the purpose of `JNDI` in J2EE?

1) Naming and directory services

2) Asynchronous messaging

3) Session management

4) Database access

Answer : Naming and directory services

What does `WAR` stand for in J2EE?

1) Web Application Archive

2) Web Access Resource

3) Web Application Resource

4) Web Active Request

Answer : Web Application Archive

Which method is used to invalidate a session in J2EE?

1) session.invalidate()

2) session.remove()

3) session.destroy()

4) session.stop()

Answer : session.invalidate()

Which technology is used for database access in J2EE?

1) JMS

2) JDBC

3) JSP

4) Servlet

Answer : JDBC