Solved

how to declare method deprecated?

Posted on 2001-09-07
6
520 Views
Last Modified: 2008-02-01
Hi,

how can I declare a method as deprecated?
0
Comment
Question by:exorcist
6 Comments
 
LVL 1

Accepted Solution

by:
LDC earned 100 total points
ID: 6464001
Put /** @deprecated */ before the method declaration.
e.g.
/**
 * There were some comments here.
 * @deprecated
 * @return an int
 */
public int deprecatedMethod() {return 1;}
0
 

Expert Comment

by:fi76631
ID: 6466135
Simply put the java-doc comment @deprecated before the method signature....ie:

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


}

0
 
LVL 10

Expert Comment

by:Nushi
ID: 6468978
exorcist

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

Nushi.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Author Comment

by:exorcist
ID: 6469081
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
 

Expert Comment

by:fi76631
ID: 6472774
OOOppps....sorry, in my haste I didn't see LDC's answer. LDC, I apologise.

Exorcist, LDC's answer is perfectly correct
Regards
0
 
LVL 3

Author Comment

by:exorcist
ID: 6474899
I am too busy right now to test this. I will just accept it and try it another week.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now