Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static char reverseToChar(int num) { /* * if (num == 10) return 'A'; else if (num == 11) return 'B'; else if * (num == 12) return 'C'; else if (num == 13) return 'D'; else if (num * == 14) return 'E'; else if (num == 15) return 'F'; else return * String.valueOf(num).charAt(0); */ return Integer.toHexString(num).charAt(0); } }