Here you can find the source of int2string(int n)
Parameter | Description |
---|---|
n | Number to convert to String |
public static String int2string(int n)
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w . jav a2s . c om*/ * Converts integer to string * @param n Number to convert to String * @return Zero-padded number converted to String */ public static String int2string(int n) { String nString = Integer.toHexString(n).toUpperCase(); return "00000000".substring(nString.length()) + nString; //$NON-NLS-1$ } }