1. Comment out date.setDate(6, 17, year); by // date.setDate(6, 17, year);
2. At the next line below, add date.readInput();
3. Run the program again. Fix any problems you may encouter along the way.
add System.out.println(date.month) and see what happens.
Why?
ans:
因為原本的程式是將month day ,year設成private,只要將其改成public即可
沒有留言:
張貼留言