Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ip;
- public class Week {
- public static final int MONDAY = 1;
- public static final int TUESDAY = 2;
- public static final int WEDNESDAY = 3;
- public static final int THURSDAY = 4;
- public static final int FRIDAY = 5;
- public static final int SATURDAY = 6;
- public static final int SUNDAY = 7;
- private int firstWeekDay;
- public Week(int firstWeekDay){
- this.firstWeekDay = firstWeekDay;
- }
- public int WeekDay (int day){
- return (firstWeekDay + day) % 8;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement