I need a method which takes an integer input (N) and returns the birthdays in the next N days. I am finding it very difficult to get any code running. Below is just a code of how I want it to work - it is in no means a working code. Any help is highly appreciated.
/* print out all the birthdays in the next N days */
public void show( int N){
Calendar cal = Calendar.getInstance();
Date today = cal.getTime();
// birthdayList is the list containing a list
// of birthdays Format: 12/10/1964 (MM/DD/YYYY)
for(int i = 0; i<birthdayList.getSize(); i++){
if(birthdayList[i].getTime()- today.getTime()/(1000 * 60 * 60 * 24) == N)){
System.out.println(birthdayList[i]);
}
}
}