Application Lifecycle And Annotation - Study Mode

[#1] What is the purpose of the `@Produces` annotation in Java EE applications?
Correct Answer

(C) To specify the media type produced by a resource method

[#2] In a Java web application, what is the role of the `@MultipartConfig` annotation?
Correct Answer

(B) To enable support for file uploads in a servlet

[#3] What is the purpose of the `@AroundInvoke` annotation in Java EE applications?
Correct Answer

(C) To intercept business method invocations

[#4] In a Java EE application, what is the primary role of the `@Stateless` annotation?
Correct Answer

(D) To indicate that a class is a stateless session bean

[#5] Which annotation is used to specify the URL pattern for a servlet in a Java web application?
Correct Answer

(A) `@WebServlet`