?
Solved

how to declare method deprecated?

Posted on 2001-09-07
6
Medium Priority
?
528 Views
Last Modified: 2008-02-01
Hi,

how can I declare a method as deprecated?
0
Comment
Question by:exorcist
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Accepted Solution

by:
LDC earned 400 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

800 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