Here you can find the source of toHex(int i, String $default)
public static String toHex(int i, String $default)
//package com.java2s; //License from project: Open Source License public class Main { public static String toHex(int i, String $default) { return i != -1 ? Integer.toHexString(i) : $default; }/* ww w . j av a2 s . c o m*/ public static String toHex(int i) { return Integer.toHexString(i); } public static String toHex(long n) { return Long.toHexString(n); } }