Here you can find the source of toHexString(int i)
Parameter | Description |
---|---|
i | the integer |
public static String toHexString(int i)
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w. ja v a 2 s. c o m*/ * convert an integer to a 2-digit hex string. * * @param i * the integer * @return the string */ public static String toHexString(int i) { String s = Integer.toHexString(i); while (s.length() < 2) { s = "0" + s; } return s; } }