Learn J2EE MCQs

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

What is the role of the `servlet container` in J2EE?

1) Manage servlet lifecycle

2) Handle exceptions

3) Handle database connections

4) Process data

Answer : Manage servlet lifecycle

What is `WAR` in J2EE?

1) Web Application Archive

2) Web Archive Resource

3) Wide Area Resource

4) Web Access Result

Answer : Web Application Archive

Which of the following is NOT a type of Enterprise Java Bean?

1) Session Bean

2) Entity Bean

3) Message-Driven Bean

4) Static Bean

Answer : Static Bean

Which J2EE technology is used for creating dynamic web pages?

1) JSP

2) Swing

3) AWT

4) JMS

Answer : JSP

What is `EAR` in J2EE?

1) Enterprise Archive

2) Enterprise Access Resource

3) Environment Archive Resource

4) Enterprise Application Resource

Answer : Enterprise Archive

Which of the following is a lightweight framework in J2EE?

1) Spring

2) Swing

3) Struts

4) Servlet

Answer : Spring

Which of the following is NOT a lifecycle method in J2EE servlets?

1) destroy()

2) init()

3) service()

4) start()

Answer : start()

What is the main purpose of `JTA` in J2EE?

1) Transaction management

2) Threading

3) Security

4) Session management

Answer : Transaction management

Which protocol is primarily used for communication in web services?

1) HTTP

2) FTP

3) SMTP

4) SNMP

Answer : HTTP

What is the purpose of `JPA` in J2EE?

1) Object-relational mapping

2) Security management

3) Messaging

4) Exception handling

Answer : Object-relational mapping