Skip to content
Sharp

Spring Core · interview question

In Spring Boot, which annotation is typically used to define a class that holds business logic?

Multiple choiceEasychapter-9-curatedpremiumspring-corecontrollers-services-repositories
Choose one answer
Answer and explanation

Correct answer

C. @Service

Why

@Service is used to mark a class as a service layer component, holding business logic. It encapsulates the application's core business rules and operations.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →