Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

What is an advice in Spring AOP?
A. The action taken by an aspect at a particular join point
B. The pointcut expression
C. The aspect itself
D. The target object
Direction: Choose the correct option

Q2.

How many types of advice are there in Spring AOP?
A. 3
B. 4
C. 5
D. 6
Direction: Choose the correct option

Q3.

Which advice runs before the method execution?
A. Before advice
B. After advice
C. Around advice
D. After returning
Direction: Choose the correct option

Q4.

Which advice runs after the method execution regardless of outcome?
A. After (finally) advice
B. After returning
C. After throwing
D. Around
Direction: Choose the correct option

Q5.

Which advice runs only if the method returns successfully?
A. After returning advice
B. After throwing advice
C. After advice
D. Around advice
Direction: Choose the correct option

Q6.

Which advice runs if the method throws an exception?
A. After throwing advice
B. After advice
C. Before advice
D. Around advice
Direction: Choose the correct option

Q7.

Which is the most powerful advice that can control method execution?
A. Around advice
B. Before advice
C. After advice
D. All are equally powerful
Direction: Choose the correct option

Q8.

What parameter can an advice method take?
A. JoinPoint
B. ProceedingJoinPoint (for around)
C. Throwable (for after throwing)
D. All of the above
Direction: Choose the correct option

Q9.

What is the purpose of the returning attribute in @AfterReturning?
A. To bind the return value to an advice parameter
B. To specify return type
C. To define return condition
D. None
Direction: Choose the correct option

Q10.

What is the purpose of the throwing attribute in @AfterThrowing?
A. To bind the thrown exception to an advice parameter
B. To specify exception type
C. To define exception condition
D. None