Java第五次上机

package daima;
import java.io.*;
import java.math.BigDecimal;
import java.util.Date;
public class file {
      public static void main(String[]args) {
          Integer number=new Integer(7);
          Boolean bool=new Boolean(true);
          Double d=new Double(3.28);
          Long  l=new Long(2568);
          Date date=new Date();
          int year=date.getYear();
          int month=date.getMonth();
          int date1=date.getDate();
          int hours=date.getHours();
          int minutes=date.getMinutes();
          int seconds=date.getSeconds();
          System.out.println(number+" "+bool+" "+d+" "+l);
          System.out.println("现在的时间是:"+(1900+year)+"年"+(1+month)+"月"+date1+"日"+hours+"时"+minutes+"分"+seconds+"秒");
      }
}
原文地址:https://www.cnblogs.com/lusilin/p/11050484.html