📄 usabbrevdate.java
字号:
// Figure 9.22public class USAbbrevDate extends Date { /** pre: 1 <= m <= 12 * and d is a sensible day for month m * (Note that this method doesn't check date validity) * post: day == d and month == m and year == y */ public USAbbrevDate( int d, Month m, int y ) { super(d, m, y); } /** post: result is a string in the form "m/d/y2" * where m is the month number, d is the day number * and y2 is the last two digits of the year. */ public String dateString() { return "" + (month.ordinal()+1) + "/" + day + "/" + twoDigitYear(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -