I am testing a nextDate() and prevDate() methods which increment a SimpleDate object and for testing purposes I am running it 400 times with a for loop. For both tests the for loop is the same but
I can only get it to increment once then print that 400 times. I figure this is a simple fix but I just can't figure it out. Any help is appreciated, thank you.
// Test nextDate SimpleDate dateTest = new SimpleDate(12 , 31 , 2008); for(int i = 0; i <400; i++) { System.out.println(dateTest.nextDate()); }
nextDate() just returns a SimpleDate object that is one day later and changed the month or year depending on the day.