Originally posted by Jesper Young:
Why don't you try it yourself and see what the compiler says?
In Java 1.4 and older, you would use the @deprecated Javadoc tag for this:
In Java 5.0 and newer, you should use the @Deprecated annotation (although the old Javadoc tag will also still work):
FWIW, I recall reading somewhere a recommendation (that made sense - but I forget the detail of the reasoning - probably something to do with compiling to earlier targets) to use both the language annotation and the javadoc annotation for 1.5+