I have done a reading about number conversions in Java
because I need to format a number inside my Android application.
I'm currently holding a long
variable with 4 digits
long variable_1 = 2203;
And this is what I'm looking to print
220.3
What I have done so far
variable_1 = 2203;
BigDecimal bd = new BigDecimal(variable_1);
bd = bd.setScale(1, BigDecimal.ROUND_HALF_UP);
txtView_variable_1.setText(String.valueOf(bd));
Result
2203.0
What am I doing wrong here?