Here you can find the source of round(double d)
public static int round(double d)
//package com.java2s; //License from project: LGPL public class Main { /**/*from w ww.j a v a2 s .com*/ * Unchecked implementation to round a number. Parameter should be known to be valid in advance. */ public static int round(double d) { return (int) (d + 0.5D); } }