double round java integer

Java
int a = (int) Math.round(doubleVar);
Source

Also in Java: