usabbrevdate.java
来自「Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套」· Java 代码 · 共 21 行
JAVA
21 行
// 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 + =
减小字号Ctrl + -
显示快捷键?