Java Frameworks
Final Assessment (Qns & Ans)
2025
General Instructions
1. Read All Questions Carefully: Make sure you understand each question.
2. Time Management: You have a specific amount of time to complete the exam.
Keep an eye on the clock and pace yourself.
3. Allowed Materials: Only use materials that are explicitly allowed. Unauthorized
materials can lead to disqualification.
4. ANS Format: Follow the required format for your ANS. For example, multiple-
choice questions might need you to select the best ANS, while essay questions
require detailed responses.
5. Academic Integrity: Adhere to the university's honor code. Any form of cheating or
plagiarism is strictly prohibited.
6. Technical Requirements: Ensure your computer and internet connection are
stable. For online exams, you might need a webcam and microphone for proctoring
purposes.
7. Submission: Submit your ANS before the time expires. Late submissions might
not be accepted.
©2024/2025
,1. Which of the following is a feature of the Spring Framework?
a) Automatic memory management
b) Dependency Injection
c) Multi-threading support
d) All of the above
Correct ANS: b) Dependency Injection
Rationale: Dependency Injection is a core feature of the Spring
Framework, facilitating loose coupling and easier testing.
2. In Hibernate, what does the term "Session" refer to?
a) A unit of work
b) Database connection
c) An object mapping
d) A web service call
Correct ANS: a) A unit of work
Rationale: A Hibernate Session is a single-threaded, short-lived
object that represents a conversation between the application and
the database.
3. Which of the following annotations is used to define a
RESTful Web Service in Spring?
©2024/2025
, a) @Service
b) @Controller
c) @RestController
d) @Component
Correct ANS: c) @RestController
Rationale: The @RestController annotation is a convenient
annotation that combines @Controller and @ResponseBody,
meaning it is ready for MVC-based RESTful APIs.
4. AJP is used in which of the following Java frameworks?
a) Hibernate
b) Struts
c) JavaServer Faces (JSF)
d) Spring
Correct ANS: b) Struts
Rationale: Apache JServ Protocol (AJP) is a binary protocol used
for communication between a web server and a servlet container,
primarily in the context of Struts.
5. In JPA, which of the following represents an entity class?
a) `@MappedSuperclass`
b) `@Entity`
c) `@Embeddable`
d) `@Transient`
©2024/2025