how to pad with zeros on left side of integer in java code example Example: java number padding zeros System.out.println(String.format("%03d", 4)); // 004