User Name
Remember Me?
Password
Register
FAQ
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Java Forums
»
General Java
»
New To Java
»
getYear deprecated method
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
01-28-2008, 09:56 AM
ravian
Senior Member
Join Date: Nov 2007
Posts: 115
Rep Power:
0
getYear deprecated method
I want to get the current year and tried the following.
Code:
System.out.println(date.getYear());
I came to know that getYear() is deprecated and further more it returns 108 which does not makes sense. Please tell me a better way of doing this.
#
2
(
permalink
)
01-28-2008, 11:35 AM
roots
Moderator
Join Date: Jan 2008
Location: Dallas
Posts: 289
Rep Power:
3
Code:
System.out.println(Calendar.getInstance().get(Calendar.YEAR));
...
Please refer to the Date Java doc, how they have justified the depreciation.
__________________
dont worry newbie, we got you covered.
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
multiple declaration of a variable
|
bytearray to string conversion
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Method Help
pringle
New To Java
4
04-16-2008
02:23 PM
I need help with a deprecated program
mikau
New To Java
0
02-13-2008
10:34 AM
Using Deprecated Methods
ravian
New To Java
3
11-23-2007
08:58 PM
method size is deprecated
oregon
New To Java
4
08-05-2007
06:59 PM
method not abstract, does not override actionperformed method.
Theman
New To Java
1
05-08-2007
07:13 AM
All times are GMT +2. The time now is
06:29 AM
.
Java Tips
|
Linux Archive
Contact Us
-
Java Forums
-
Sitemap
-
Top
VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Bookmark in Technorati