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

时间:2023-03-09 23:59:47
【技巧】-NO.123.数据处理技巧

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