Write a program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year on the console. For example, if the user entered the year 2005, and 6 for Saturday, January 1, 2005, your program should display the following output:
January 1, 2005 is Saturday
...
...
...
...
December 1, 2005 is Thursday
I've developed this code
Scanner input=new Scanner(System.in);
//Prompt the user to enter the year
System.out.print("Enter a year:");
int year=input.nextInt();
//Prompt the user to enter the first day of the year
System.out.print("Enter the first day of the year\nEX:0-Sunday,1Monday,2-Tuesday,........,6-Saturday:");
int firstDayOfTheYear=input.nextInt();
Calendar c=Calendar.getInstance();
}
i don't know how can i complete this program
so, I'd be grateful if you help me
thanks

New Topic/Question
Reply




MultiQuote







|