Java 的日期与时间处理

package com.lgs.file;

import java.util.Calendar;
import java.util.Date;

import javafx.scene.chart.PieChart.Data;

public class data1 {

     public static void main(String[] args) {
          // TODO Auto-generated method stub
          long now = System.currentTimeMillis();
          System.out.println("now = "+ now);

          Date d1 = new Date(now);

          System.out.println("d1 = "+ d1);

          Calendar c1 = Calendar.getInstance();

          System.out.println("c1 = "+ c1.getTime().toString());

     }

}

你可能感兴趣的:(Java 的日期与时间处理)