In general, it is better to use the Javadoc @deprecated tag, since that will do the same thing as far as the compiler is concerned, but it allows a description to be added, which will show up in the docs.