import java.io.*; import java.lang.*; public class ByteToHexa{ public static void main(String[] args) throws IOException{ BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the byte number:"); byte b =(byte)6; String str = buff.readLine(); int i =Integer.parseInt(str); String hexString = Integer.toHexString(i); System.out.println("Hexa is:=" + hexString); } }