Following program shows how to round a number to 2 decimal places.
public class Tester { public static void main(String[] args) { double number = 122.2363534; double result = Math.round(number*100)/100.0d; System.out.println(result); } }
122.24