how to declare method deprecated?

Hi,

how can I declare a method as deprecated?
LVL 3
exorcistAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
LDCConnect With a Mentor Commented:
Put /** @deprecated */ before the method declaration.
e.g.
/**
 * There were some comments here.
 * @deprecated
 * @return an int
 */
public int deprecatedMethod() {return 1;}
0
 
fi76631Commented:
Simply put the java-doc comment @deprecated before the method signature....ie:

/**
 * @deprecated
*/
public myMethod(...) {


}

0
 
NushiCommented:
exorcist

you should get LDC as the answer.
He/She where the first one to answer your question currectly.

Nushi.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
exorcistAuthor Commented:
I think this is a joke, fi76631. Thanks for your copy-and-past effort.

I will try this tomorrow and grade it then, LDC.
0
 
fi76631Commented:
OOOppps....sorry, in my haste I didn't see LDC's answer. LDC, I apologise.

Exorcist, LDC's answer is perfectly correct
Regards
0
 
exorcistAuthor Commented:
I am too busy right now to test this. I will just accept it and try it another week.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.