Java program that prompts the user to enter a 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 had 29 days. If the user entered month 3 and year 2015, the program should display that March 2015 had 31 days.

Liang Introduction to Java Programming exercise 3.11 solution
Sample run

Click here to see other solutions to Introduction to Java Programming.

Write A Comment