Question: Write a Java program: Write a program that prompts the user to enter the month and year and displays the number of days in the
Write a Java program:

Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2012, the program should display that February 2012 has 29 days. If the user entered month 3 and year 2015 , the program should display that march 2015 has 31 days. The sample run is as below: Enter a month in the year (e.g., 1 for Jan): 4 Enter a year: 2012 April 2012 has 30 daysBUILD SUCCESSFUL (total time: 7 seconds)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
