
java making a method deprecated
In Java how to declare a method depricated? Is it correct to use
depricated method in my application? But at the same time i want
to show a "warning" message to anyone who is using that method.
Please tell me how to achieve that?

Declare "@Deprecated" before a method to create a method deprecated in your Java application. Though, it is not a correct
way to use a deprecated class or method in Java. Instead of it
you can use alternatives that exists.
Syntax of declaring a method deprecated.
/**
* Does some thing in old style.
*
* @deprecated use {@link new()} instead.
*/
@Deprecated
public void old() {
// ...
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.