Here you can find the source of intToString(int i)
public static String intToString(int i)
//package com.java2s; //License from project: Open Source License public class Main { public static String intToString(int i) { if (i < 0) { throw new IllegalArgumentException("Illegal call: intToString(" + i + ") - i < 0 is not allowed."); }// w w w . j a v a 2 s . co m if (i > 999) { throw new IllegalArgumentException("Illegal call: intToString(" + i + ") - i > 999 is not allowed."); } return String.format("%1$03d", i); } }