Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package chapter11_1;
- public class CalendarDate {
- private int month, day, year;
- public int getMonth() {
- return month;
- }
- public int getDay() {
- return day;
- }
- public int getYear() {
- return year;
- }
- /*
- * answer to 8.4 begins here
- */
- public boolean equals(CalendarDate date){
- return (month == date.getMonth() &&
- day == date.getDay() &&
- year == date.getYear());
- } //ends here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement