Question: A class Date has methods intgetMonth() and intgetDay(). Write a method public boolean has3OnSameDay(Date[] birthdays) that returns true if at least three birthdays in the
A class Date has methods intgetMonth() and intgetDay(). Write a method public boolean has3OnSameDay(Date[] birthdays) that returns true if at least three birthdays in the array fall on the same date. Your method should work in O(n) time, where n = birthdays.length.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
