Q) Obtain the English name of a given month by its number
Example:
Input:
Enter month number: 4
Output:
April
public String monthName (int n){ //create an array containing all the names of the months in order String [] months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; //return the (n-1)th month name return months[n-1]; }