⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.util.*;
import java.text.*;

class Main {
    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();

        // We are interested in the time at GMT.
        cal.setTimeZone(TimeZone.getTimeZone("GMT"));

        // Print the date at GMT at time 0.
        cal.setTime(new Date(0));
        System.out.println(cal.get(Calendar.DAY_OF_WEEK));  // 5    <THURSDAY>

        // Print the date at GMT at time -1 day.
        cal.setTime(new Date(-24*60*60*1000));
        System.out.println(cal.get(Calendar.DAY_OF_WEEK));  // 4    <WEDNESDAY>
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -