Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- MonthTester.java MrG 2011.1027
- purpose: enter month # month name using String class
- required: MonthTester.java main class
- Month.java derived class
- translator: javac MonthTester.java
- interpreter: java MonthTester
- */
- //imported class
- import java.util.Scanner;
- public class MonthTester
- {
- public static void main(String[] args)
- {
- Scanner in = new Scanner(System.in);
- System.out.println("enter month as a number: ");
- int month = in.nextInt();
- Month joey = new Month(month);
- System.out.println("The month is " + joey.getName());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement