Dear Java Programmer:
Here hex is a string. A 10 is entered into the JOption pane. This is
recognized as a character of '1' and '0'.
//This comes into this method and the length of 2 makes
//a one dimensional array of 2 with the values [0],[1].
int intEq[] = new int[hex.length()];
//hex.length = 2
for (int i = 0; i < hex.length(); i++) {
//first character is '1'
currChar = hex.charAt(i);
if (currChar >= '0' && currChar <='9') {
//evaluates '1'-'0' to what? How do you subtract literals?
intEq[i] = currChar - '0';
Respects,
JKid314159
http://existentialists.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---