問題文
An annotation type is declared with the use of a type as its only target, and a build then rejects the spelling that puts the annotation in front of a fully qualified class name while it accepts the spelling that puts the annotation right in front of the last name in it. What is the standing rule, and what supports it?
選択肢
- The name that the annotation sits closest to has to be a type, because the language reads the annotation as a modifier of the declaration in that position and only a type may be modified where a declaration is expected
- The name that the annotation sits closest to has to be a type, because a package name is the kind that the simple name in front of the dots carries and the language bars an annotation from every location where that kind applies
- The place where the annotation sits inside the name is free, because the reading of a qualified name walks from left to right and each dot passes the annotation along to the term that follows it
- The place where the annotation sits inside the name is free, because the compiler folds the whole qualified name into one term and any annotation in front of it reaches the class that the term denotes