Here you can find the source of lpad(int length, long number)
public static String lpad(int length, long number)
//package com.java2s; //License from project: Open Source License public class Main { public static String lpad(int length, long number) { String f = "%0" + length + "d"; return String.format(f, number); }//from w w w.ja v a 2s . c o m }