Today our professor discussed with the class that what "class X or method X get deprecated" means? From what I understood, it means, for example, that we are not going to get that method or class in the Java API in the future so we better use another method or class instead of this class. Then comes another question, why do they get deprecated?
My guess for this question was that it is because the Java API developers may find those classes or methods are using an algorithm which is not efficient and they replace them with another class(es) or method(s) which are more efficent. But the professor wasn't happy with my answer and told me to google. And I couldn't find anything. Can you please tell me why the classes get deprecated?