How to get day of week in Java?

 
 

Share on Google+Share on Google+

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

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









Ads

 
Advertisement null

Ads