My code is here.Actually I want to convert a binary string such as "0100001110111111" into corresponding hex format.The code is working fine for small input strings but for long input string NumberFormatException is shown and it is not working.
public class Test
{
public static void main(String[] args)
{
for (int i = 0; i < args.length; i++)
{
System.out.println("The value of " + args[i] + " is " +
Integer.toHexString(Integer.parseInt(args[i], 2)));
}
}
}