Add leading zeroes to a number
public class Main { public static void main(String[] args) { int number = 1500; String formatted = String.format("%07d", number); System.out.println("Number with leading zeros: " + formatted); } }