Basically the user inputs a year and my program supposed to print the date. For example, if the user inputs 2012 then my program will print out 11,22,2012. However my program is printing out something like Date@1ea0105 which someone told me was a reference (memory location). How can I fix this? Thank you.
You need to fix the line where you set the start date as the Date constructor takes different things than you think it does. Look at the detailed explanation for the constructor to get all the required information.
Also, in your loop, you are incrementing a counter for the week and for the day. So you will have ints that represent the week and the day and the year of Thanksgiving, But what will you return from the function?
The Date class does have a method to determine the day of the week, but it is not getDayOfWeek()
Joined: Nov 03, 2012
My professor said to use this.
d1.getShortDate() // returns the date as mm/dd/yyyy
How would I use that?