I have a code line like this VALUE_OF_REAL(#unitPrice, "{#,##0.00}{TR}")
My unitPrice before above line : 2.1450000000000000000000000000000
After VALUE_OF_REAL(#unitPrice, "{#,##0.00}{TR}")
my unitPrice : 2.145
But my unitPrice before the line like that : 271.4050000000000000000000000000000
After VALUE_OF_REAL(#unitPrice, "{#,##0.00}{TR}")
then my unitPrice : 271.40
How it is works ? I have to convert this line to java but every time I get different values.
I tried new DecimalFormat("#,##0.00", localization). format(customer.getUnitPrice().setScale(2, RoundingMode.HALF_UP)
and
new DecimalFormat("#,##0.00", localization). format(customer.getUnitPrice().setScale(2, RoundingMode.HALF_DOWN)
1