The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

how is this

Posted by Alok Kumar on September 05, 2001 at 9:35 AM

What happens when i add a new arguement to a method(the name is same).How to deprecate the older method which has lesser number of arguements?
I don't want to overload the method as it is a too big�
Regards
Alok

> You can use javadoc @depcreate tag in order to make any method to deprecate.
> suppose you have method add(int i, int j) in class Addition.
> you want to deprecate this method. Then you can write the code like this

> class Addition {
> /**
> * @param int i
> * @param int j
> * @return i+j
> * @deprecate use add(Object o1,Object o2)instead
> */
> int add(int i, int j){






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us