Originally Posted by
Junky
Here is how I would do it. Get rid of all those variables. Read user input as a String. Iterate over the String one char at a time and use a switch statement.
Might have to go that route, though I am not familiar with a "switch statement".
Originally Posted by
Norm
What do you intend to do with the variables: a,A, ... f,F?
Will they be declared as final and their values never changed?
How will you use those variables to convert what the user enters to hexidecimal?
The data in the variables will just be used to compute an answer from hex to decimal, binary, and char, and vice versa. Though I will need it to be printed later too, the variables themselves that is, to the terminal screen. I never thought of declaring them as a final.. but no, their values will never change.
I'm going to use them in some sort of algorithm that is commonly or uncommonly used by people to figure out hex on paper.
---Now that I'm thinking about it, I might have to just use
if and
else if statements to give me what I want. If it seems not much else can be done.