今天上午学习了StringBuffer 这个方法主要是 在字符串中插入字符和追加字符串中的字符
还有Random随机数 是util包中的东西 方法有
System.out.println(Math.abs(a));//绝对值
System.out.println(Math.max(a,b));//最大值
System.out.println(Math.min(a,b));//最小值
System.out.println(Math.floor(c));//向下取整
System.out.println(Math.ceil(c));//向上取整
System.out.println(Math.round(c));//四舍五入
今天晚上学习了Date日期对象是util包中的东西
Date date = new Date();
System.out.println(date);//系统默认格式
现在我们要将这个转成人为可以看懂的时间
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
String format = simpleDateFormat.format(date);
System.out.println(format);