I 've got some double numbers like :3.0
3.1
4.0
5.2
,etc.
Can I Judge if the number ends with .0
like 3.0
and 4.0
?
Is there a best way to do so ?
PS:I converted them to String type,however I don't think it's the best way.
double i = 3.0;
String d = i + "";
return d.endsWith(".0");