2V0-72.22PSE · Question #28
Which statement defines a pointcut? (Choose the best answer.)
The correct answer is B. An expression that selects one or more join points. Option B is correct because a pointcut is precisely the expression or predicate used to select which join points (specific execution moments) an advice should apply to - it's the "where" filter in AOP. Why the others are wrong: A describes a join point - a specific moment in…
Question
Which statement defines a pointcut? (Choose the best answer.)
Options
- AA point in the execution of a program such as a method call or field assignment.
- BAn expression that selects one or more join points.
- CA module that encapsulated advices.
- DCode to be executed at each selected join point.
How the community answered
(51 responses)- A4% (2)
- B88% (45)
- C2% (1)
- D6% (3)
Explanation
Option B is correct because a pointcut is precisely the expression or predicate used to select which join points (specific execution moments) an advice should apply to - it's the "where" filter in AOP.
Why the others are wrong:
- A describes a join point - a specific moment in program execution (e.g., a method call), not the selector for those moments.
- C describes an aspect - the module that bundles together pointcuts and their associated advices.
- D describes advice - the actual code/action executed at the selected join points.
Memory tip: Think of it as a hierarchy - a join point is a candidate location, a pointcut is the query that picks those locations, advice is the code that runs there, and an aspect is the container holding it all together. The word "cut" in pointcut hints at cutting across multiple points - i.e., selecting them.
Topics
Community Discussion
No community discussion yet for this question.