Here you can find the source of ZeroPad(int number, int width)
public static String ZeroPad(int number, int width)
//package com.java2s; public class Main { public static String ZeroPad(int number, int width) { StringBuffer result = new StringBuffer(""); for (int i = 0; i < width - Integer.toString(number).length(); i++) result.append("0"); result.append(Integer.toString(number)); return result.toString(); }/*from www.j a va2 s. com*/ }