I created a class that does various things with given dates. In that class I attempted to write a method the will calculate the month/day/year of the next day. What I have isn't working(keep getting an error message). If someone could take a look and tell me why it wont work and/or point me in the right direction, that would be awesome.
Date Class:
Date Tester:
Output:
Today's date is 4/24/2012
My birthday is 1/5/2012
My brother's birthday is 7/20/2012
Christmas is on 12/25/2012
4/24/2012 equals 4/24/2012 true
4/24/2012 equals 12/25/2012 false
Is 2000 a leap year? true
Is 2001 a leap year? false
Is 1600 a leap year? true
Is 2012 a leap year? false
Exception in
thread "main" java.lang.StackOverflowError
at Date.daysInMonth(Date.java:22)
at Date.nextDay(Date.java:31)<--This keeps repeating for quite a few more lines
Again if someone could help me out that would awesome! In the mean time I'll keep at it.