考过Math.ceil() Math.floor、
SimpleDateFormat
public SimpleDateFormat(String pattern)
SimpleDateFromat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String str = dateFormat.format(calendar.getTime());
枚举是由一组固定的常量组成的类型
遇到常量值固定时最好用枚举
可以用类、接口(用的最多,但不提倡)、枚举来定义常量
.
public enum Grander{Male, FeMale} 枚举就是一个类
public class ** {
public viod **() {
private Gander gander;
student.setGander(Gendar.Male);
}
}
单例:在一个JAVA虚拟机里面,只能产生一个实例
private static Sington sington=null;
|
|