Java tutorial
public class Main { public static void main(String[] args) { System.out.println(Integer.toHexString(0)); System.out.println(Integer.toHexString(10)); System.out.println(Integer.toHexString(11)); System.out.println(Integer.toHexString(16)); System.out.println(Integer.toHexString(17)); System.out.println(Integer.toHexString(100)); System.out.println(Integer.toHexString(1000)); } }