Question: Currently I am working on an program where i have to convert numbers such as decimal to binary, hexadecimal to binary, ect. Currently when I
Currently I am working on an program where i have to convert numbers such as decimal to binary, hexadecimal to binary, ect. Currently when I try to do my binary to hexadecimal conversion it only accepts up to 8 digits and I don't know how to fix it. Attached is the portion of my program and error message

Bluel: Terminal Window - drive-download-20190906T192837Z-001 - O X Binary-drive-download-20190906T1928372-001 Class Edit Tools Options Binary X Options Select Conversion 1: Decimal to Binary 2: Decimal to Hexadecimal 3: Binary to Decimal 4: Binary to Hexadecimal 5: Hexadecimal to Decimal 6: Hexadecimal to Binary 7: Exit Please enter your choice: Compile Undo Cut Copy Paste Find... Close Source Code - * * * converts binary to hexadecimal * Enter a binary number : 000000000000 private void toHex( { int i; int j = 0; StringBuffer hex = new StringBuffer("00000000"); String bin = Integer.toString(binary); for(i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
