How to get day of week in Java?

Hi,

How to get day of week in Java?

Thanks

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









Related Tutorials/Questions & Answers:
Advertisements