hi, annotation elements can be class(which we created own class). I saw this sentence on Boyarsk's book:
"Similar to a default element value, an annotation element cannot be declared with just any type. It must be
a primitive type, a String, a Class, an enum, another annotation, or an array of any of these types"
It is only this type, and not any other Class or class in the world, that is an acceptable, legal type.
This class named Class gets used very heavily in a relatively advanced Java technique called Reflection.
Reflection is 95%+ off-topic for even the 819, it is important in the industry for advanced Java programming but you don't need to know about it for the exams.
So just know that java.lang.Class is the only class they mean in this section on annotations.
For general Java use, please know it would be a terrible idea to ever try to create your OWN class named Class, because Java's is right there in the java.lang package which would make life VERY confusing for everyone if you did so.
RTFJD (the JavaDocs are your friends!) If you haven't read them in a long time, then RRTFJD (they might have changed!)
A magnificient life is loaded with tough challenges. En garde tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth