• Post Reply Bookmark Topic Watch Topic
  • New Topic

getDay() from type Date is deprecated ?  RSS feed

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does anyone know why when I do this:

Date date = new Date();

return date.getDay()+1;

(using eclipse) I get a yellow line under the stmt: date.getDay() AND a middle line crossing the word getDay()

when I place the cursor on top of 'getDay()' I get this:
the method getDay() from type Date is deprecated.

the result are correct but, I wonder if I should use something else?

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are going to be writing Java, you need to learn how to read the Javadoc API.

Here's the entry for java.util.Date. What does have to say about the getDay() method?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!