Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 1
how to fix decimal places to two?
2 Réponses
+ 2
Double number;
number = Math.rint(number * 100) / 100;
+ 1
You may refer to this guide
http://tutorials.jenkov.com/java-internationalization/decimalformat.html