how to round a double to the nearest tenth in java code example Example: double round java integer int a = (int) Math.round(doubleVar);