Java tutorial
//package com.java2s; import java.text.NumberFormat; import java.util.Locale; public class Main { public static String getPageFileName(int p) { NumberFormat nf = NumberFormat.getInstance(Locale.US); nf.setMinimumIntegerDigits(3); return "page" + nf.format(p) + ".png"; } }