@PreDestroy is used for cleanup before a bean is destroyed.

Practice this question from Quiz: Spring Core, with options and an explanation.

Question

@PreDestroy is used for cleanup before a bean is destroyed.

Option A — Correct answer

True

@PostConstruct runs after the bean is constructed and dependencies are injected.

Option B

False

@PostConstruct runs after the bean is constructed and dependencies are injected.

Quiz: Spring Core

All questions · Previous question · Next question

Open on QuizMaker