Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions