码迷,mamicode.com
首页 > 其他好文 > 详细

【技巧】-NO.123.数据处理技巧

时间:2018-10-22 15:44:48      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:related   diff   sys   red   mac   links   logs   nbsp   oal   

Style:Mac

Series:Java

Since:2018-09-10

End:2018-09-10

Total Hours:1

Degree Of Diffculty:5

Degree Of Mastery:5

Practical Level:5

Desired Goal:5

Archieve Goal:3

Gerneral Evaluation:3

Writer:kingdelee

Related Links:

http://www.cnblogs.com/kingdelee/

 

1.判断数值是否为整数(即是否包含小数位)

 // 1.判断数值是否为整数(是否包含小数位)
        double a = 12d;
        double b = 12.1d;

        System.out.println(a % 1); // 0.0
        System.out.println(b % 1); // 0.099
        System.out.println(a % 1 == 0); // true

  

 

【技巧】-NO.123.数据处理技巧

标签:related   diff   sys   red   mac   links   logs   nbsp   oal   

原文地址:https://www.cnblogs.com/kingdelee/p/9830246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!