Calendar instance = Calendar.getInstance();
int year = instance.get(Calendar.YEAR);
int month = instance.get(Calendar.MONTH);
int day = instance.get(Calendar.DAY_OF_MONTH);
int i = instance.get(Calendar.HOUR_OF_DAY);
int i1 = instance.get(Calendar.MINUTE);
int i2 = instance.get(Calendar.SECOND);
Calendar instance = Calendar.getInstance();
instance.add(Calendar.YEAR,-2);
int year = instance.get(Calendar.YEAR);
System.out.println(year);
Calendar instance1 = Calendar.getInstance();
instance1.set(2012,10,10,14,20,30);
int i = instance1.get(Calendar.YEAR);
就是扩容
long maxValue1 = Long.MAX_VALUE;
long maxValue2 = Long.MAX_VALUE;
BigInteger a = new BigInteger(maxValue1 + "");
BigInteger b = new BigInteger(maxValue2 + "");
BigInteger multiply = a.multiply(b);
System.out.println(multiply);