Use Display 4.14 to call 4.13 (2nd ed.) or
Display 4.12 to call 4.11 (1st ed.).
After you finish the above, try the following
Date birthday = new Date("Jan",1,2000);
birthday.Date("Feb",1,2000);
birthday.setDate("Feb",1,2000);
birthday=new Date("Mar",1,2000);
Source code:
1.
2.
3.
4.
5.
6.
7.
8.
main.
(附)如果今天程式有使用到constructor,但你的程式沒有寫到constructor(),因此在主程式寫到Date object = new Date( ),此時程式就會出錯。如下圖:
沒有留言:
張貼留言