title: Recurring decimal rounding to second place
body: <p>I have a division 4/3 which produces 1.33333333... I am storing the result in java double and I want to round this result to 1.34. How can this be done in Java ?</p>
  
  <pre><code>import java.text.*;
  import java.math.RoundingMode;
  public class HelloWorld{
  
       public static void main(String []args){
  
  
       DecimalFormat decimalFormat = new DecimalFormat("#.##");
       decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
        String dd =decimalFormat.format(1.33333333);
        System.out.println(dd);
       }
  }
  </code></pre>
  
  <p>Works with (Math.ceil(1.333333 * 100) / 100.0) but not with DecimalFormat</p>