Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Month.java MrG 2012.1019
- public class Month
- {
- private int month;
- private final int MON_LEN = 3;
- private final String MONTHS="JanFebMarAprMayJunJulAugSepOctNovDec";
- public Month(int month)
- {
- this.month = month;
- }
- public String getName()
- {
- int temp = month*MON_LEN-3;
- return MONTHS.substring(temp,temp+MON_LEN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement