//This is the solution to problem 5 in the Sample Question set import java.util.Scanner; class Month { public static void main (String [] args) { Scanner in = new Scanner (System.in); System.out.print("Enter the current month : "); int month = in.nextInt(); // To get the current month (as an integer) from the user. // Should be familiar with this by now if(month == 1) // if it's January, print Happy New Year System.out.println("Happy New Year"); else if (month == 6 || month == 7 || month == 8) // If it's one of the Summer months, print the proper message System.out.println("Have fun on your vacation"); else System.out.println("Have a nice day"); // If it's none of the above, print a generic message } }