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)      4 months and 4 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