Вот, примеры кода:
public class Main {
public static void main(String[] args) {
final double num1 = 10.14;
final double num2 = 11.142;
final double num3 = 13.1844;
final Double sum = (num1 + num2 + num3);
long result1 = Math.round(sum);
System.out.println(result1);
BigDecimal result2 = BigDecimal.valueOf(sum).setScale(0, RoundingMode.HALF_UP);
System.out.println(result2);
BigDecimal result3 = BigDecimal.valueOf(sum).round(new MathContext(2, RoundingMode.HALF_UP));
System.out.println(result3);
Long result4 = sum.longValue();
System.out.println(result4);
}
}