Java Utililty Methods Integer to String

List of utility methods to do Integer to String

Description

The list of methods to do Integer to String are organized into topic(s).

Method

StringconvertIntToString(int value)
Converts the int value to string.
return String.valueOf(value);
StringconvertIntToString(int value)
convert Int To String
return Integer.toString(value);
Stringint2str(int someint)
intstr
return new Integer(someint).toString();
Stringint2String(int i)
int String
String str = "";
if (i < 10) {
    str = "0" + Integer.toString(i);
} else {
    str = Integer.toString(i);
return str;
Stringint2String(int i)
Converts an integer to its string representation.
return Integer.toString(i, 10);
Stringint2String(int i, int subNum)
int String
String returnValue = "00000000" + String.valueOf(i);
return returnValue.substring(returnValue.length() - subNum, returnValue.length());
Stringint2string(int n)
Converts integer to string
String nString = Integer.toHexString(n).toUpperCase();
return "00000000".substring(nString.length()) + nString; 
Stringint2string(int[] a)
intstring
if (a.length < 1)
    return "";
String s = String.valueOf(a[0]);
for (int i = 1; i < a.length; i++)
    s += "," + String.valueOf(a[i]);
return s;
Stringint2String(Integer int_obj)
int String
if (int_obj == null) {
    return null;
String retstr = Integer.toString(int_obj);
return retstr;
byte[]int2Word(int val)
int Word
byte[] ret = new byte[2];
int firstByte = (0x0000FF00 & val) >> 8;
int secondByte = (0x000000FF & val);
ret[0] = (byte) firstByte;
ret[1] = (byte) secondByte;
return (ret);