Java Calendar clone方法 Java示例下载网页(Java爬虫) Java示例-获得主机IP地址1 Java Calendar clone方法 package com.codingdict; import java.util.*; public class CalendarDemo { public static void main(String[] args) { // create new calendar at specific date. Calendar cal = new GregorianCalendar(2008, 05, 20); // print date for default value System.out.println("Past calendar : " + cal.getTime()); // create a clone of first cal Calendar cal2 = (Calendar) cal.clone(); // display the copy System.out.println("Cloned calendar : " + cal2.getTime()); } } Java示例下载网页(Java爬虫) Java示例-获得主机IP地址1