Solved

how to declare method deprecated?

Posted on 2001-09-07
6
523 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Arrays.asList  VS  ArrayList 4 71
javap bin 2 41
hibernate example using maven 12 58
JAVA API design with micro service cloud in mind 1 47
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

839 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