
Write a java program to display day of week like monday,tuesday etc. using JAVA calendar class

import java.util.*;
public class DayofWeek {
public static void main(String[] args) {
String[] strDays = new String[]{"Sunday","Monday","Tuesday","Wednesday","Thusday","Friday","Saturday"};
Calendar cal = Calendar.getInstance();
String today=strDays[cal.get(Calendar.DAY_OF_WEEK) - 1];
System.out.println("Today is: " + today);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.