Thursday, April 10, 2003 06:55 AM
Deprecated means you shouldn't use the class anymore. The Javadoc for the class is where it is designated as deprecated, and typically the javadoc indicates what you should use instead, as its replacement. I have even deprecated my own class, internally, as a reminder to myself to fix the places where I use it, to do something new instead. The danger is that something you are using, which is deprecated now, might disappear, in some future version of the library API.
Legacy is just a term for old things that probably shouldn't be used anymore, but which are still being supported, for now. There is nothing enforcing it or strictly defining it, not like the deprecated tag in javadoc. Except, it may be a prelude to marking something as deprecated -- the writers describing a class as legacy may be warning you, that it might actually be marked as deprecated someday in a future version.