标签:time imp sys string finally imei ISE final system
import java.util.Calendar; public class Calendarfinally { public static void main(String[] args) { Calendar ca = Calendar.getInstance(); //System.out.println(ca); // 获得年 int year = ca.get(Calendar.YEAR); // 获得月 int month = ca.get(Calendar.MONTH); // 获得日 int day = ca.get(Calendar.DAY_OF_MONTH); // 获得小时 int hour = ca.get(Calendar.HOUR_OF_DAY); // 获得分钟 int minute = ca.get(Calendar.MINUTE); // 获得秒 int second = ca.get(Calendar.SECOND); // 获得毫秒 int ms = ca.get(Calendar.MILLISECOND); /** * 设置日历 */ ca.set(Calendar.YEAR, 1999); ca.set(Calendar.MONTH, 1999); ca.set(Calendar.DAY_OF_MONTH, 1999); ca.set(Calendar.HOUR_OF_DAY, 1999); ca.set(Calendar.MINUTE, 1999); ca.set(Calendar.SECOND, 1999); ca.set(Calendar.MILLISECOND, 1999); //获得日历相关的毫秒数 long ms2 = ca.getTimeInMillis(); } }
标签:time imp sys string finally imei ISE final system
原文地址:https://www.cnblogs.com/java-jiangtao-home/p/9374764.html