Java Integer to String int2string(int n)

Here you can find the source of int2string(int n)

Description

Converts integer to string

License

Open Source License

Parameter

Parameter Description
n Number to convert to String

Return

Zero-padded number converted to String

Declaration

public static String int2string(int n) 

Method Source Code

//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$
    }
}

Related

  1. convertIntToString(int value)
  2. int2str(int someint)
  3. int2String(int i)
  4. int2String(int i)
  5. int2String(int i, int subNum)
  6. int2string(int[] a)
  7. int2String(Integer int_obj)
  8. int2Word(int val)
  9. integerToString(Integer i)