round value to long java from double code example Example: double round java integer int a = (int) Math.round(doubleVar);