This program displays numbers with leading zeros.

Java Code:
public class number {
 	public static void main(String args[]) {
 		long n = 123456789;
 		String mask = "00000000000000";
 		String ds = Long.toString(n); 
// double to string
 	String z = mask.substring(0 , mask.length() - ds.length()) + ds;
 	System.out.println(z);
}
}