Link to home
Start Free TrialLog in
Avatar of pheats
pheats

asked on

What is deprection in java ?


I have this error.

The method getYear invoked for type java.util.Date with arguments ()
is deprecated.

What exactly does this mean ??


How would I resolve this ?

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

It means that thse methods are on the way out and Sun wants to tell you so. You should use a Calendar to do this.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of arjanh
arjanh

Deprecated means that you preferably shouldn't use it in new programs. It is not really an error, just a warning.
Calendar.get(Calendar.YEAR) - 1900
>>  It means that thse methods are on the way out

CEHJ is right.  However, I don't know of any deprecated items that have actually been removed yet?

Does anybody know of any?

(Just for interest ;-))
I don't know of any personally ;-)