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

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.text.DateFormat;import java.util.Calendar;class Main {    public static void main(String args[]) {        // Create a date format.        DateFormat df = DateFormat.getInstance();        // Get the day of week from calendar.        System.out.println(df.getCalendar().get(Calendar.DAY_OF_WEEK));        // Create a clone.        DateFormat dfCopy = (DateFormat)df.clone();         // Get the day of week from clone's calendar.        System.out.println(dfCopy.getCalendar().get(Calendar.DAY_OF_WEEK));        if(df.equals(dfCopy)) {            System.out.println("Copy is equal to original");        } else {            System.out.println("Copy is not equal to original");        }        // Compute hashcode.        int hc = df.hashCode();        System.out.println("Hash code is: " + hc);    }}

⌨️ 快捷键说明

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