Solved

how to declare method deprecated?

Posted on 2001-09-07
6
526 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 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Industry Leaders: 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!

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
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

738 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