Here you can find the source of formatHex(Integer input)
public static String formatHex(Integer input)
//package com.java2s; //License from project: LGPL public class Main { public static String formatHex(Integer input) { return "0x" + Integer.toHexString(input); }/*w w w. j av a 2s .c o m*/ }