• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calendar class  RSS feed

 
vijaya vinayagam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When i used the static method "Calendar.DAY_OF_WEEK" it gives me the output as "7" but it should give me "6"(Friday).

Should i need to set some values using set() method???.

Thanks in advance
 
Joe Ess
Bartender
Posts: 9439
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calendar.DAY_OF_WEEK is not a method. It is a static field:

If you want the current day of the week, you should create a Calendar instance and use the get() method with the field value you wish to retrieve:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!