// Input a valid month package month; import java.util.*; public class ValidMonth { public static void main(String[] args) { Scanner keyboard=new Scanner(System.in); //do just once int month; System.out.print("Enter the number of a month:"); month=keyboard.nextInt(); if (month <1 || month >12) System.out.println(month+" is NOT a valid month"); else System.out.println(month+" is a valid month"); }//main }//class