Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

How to get day of week in Java?

Ads

 
 

Share on Google+Share on Google+

Java Coder
How to get day of week in Java?
1 Answer(s)      2 months and 8 days ago
Posted in : Java Beginners

Hi,

How to get day of week in Java?

Thanks

Ads
View Answers

April 16, 2017 at 8:48 PM


Hi,

Calendar class is very useful in Java. You can use this class for getting the day of the week.

Here is sample code:

int weekday = calendar.get(Calendar.DAY_OF_WEEK);

Check examples at Find the Day of the Week.

Thanks


Ads