📄 getsystemtime.java
字号:
package com.wy.tool;
import java.util.Calendar;
public class GetSystemTime {
private Calendar now = Calendar.getInstance();
private int year = now.get(Calendar.YEAR);
private int month = now.get(Calendar.MONTH) + 1;
private int day = now.get(Calendar.DAY_OF_MONTH);
public String getToday() {
String today = this.year + "-" + this.month + "-" + this.day;
return today;
}
public String getYearMonth() {
String today = this.year + "-" + this.month ;
return today;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -