java – division double android
•
Android
My department on Android has a problem:
double test= 100/ 1280;
double test2 = 0.2354;
System.out.println(test);
System.out.println(test2);
I have
0.0
0.2354
I want
0.078125
0.2345
thank you
resolvent:
Try this
double test= (double) 100/ 1280;
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码