I need to show the user an amount to pay, but the result returned is the following 1700.292 , the user will find it an error.
You need to show the exact amount separated by points - > 1,700,292
Correct result: 1,700,292
Erroneous result that is what it gives me now: 1700.292
salaryMensual = 785.292
cestaTiket = 915,000
wageMensual + basketTiket; = 1,700,292
public class Prueba{
public static void main(String[] args){
double value1 = 785.292;
double value2 = 915.000;
System.out.println(BigDecimal.valueOf(value1 + value2));
}
}
How can you use the class to achieve decimal points?