title: java BigDecimal round up/down automatically
body: <p>i have a function that calculates data that creates a BigDecimal format variable and im trying to round up or down accordingly with the results. For instance:</p>
  
  <p>16.543242123 should be 16.5
  3.35 should be 3.4
  6.3456 should be 6.3</p>
  
  <p>and so on, if the 3rd digit is equal to 5 or above to round up the 2nd digit, if its equal to 4 and below, to remove the 3rd digit. This does not absolutely need to be BigDecimal, i can figure out converting the numbers after i manage to do the rounds up.
  Thanks in advance.</p>