工作笔记

数据类型向下转换,精度丢失,可能会出现错误结果:

public class SimpleFormat {
    public static void main(String[] args) {
        int a=1111111;
        short b=(short)a;
        System.out.println(b);
        //输出:-3001 
    }
}

 工具类DateFormatUitls

posted @ 2018-12-26 16:16  笔记Next  阅读(98)  评论(0编辑  收藏  举报