Skip to content

Commit d5c673a

Browse files
authored
Update HexaDecimalToDecimal.java
1 parent 0073605 commit d5c673a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Conversions/HexaDecimalToDecimal.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ public static int getHexaToDec(String hex){
1111
int val = 0;
1212
for (int i = 0; i < hex.length(); i++)
1313
{
14-
char c = hex.charAt(i);
15-
int d = digits.indexOf(c);
14+
int d = digits.indexOf(hex.charAt(i));
1615
val = 16*val + d;
1716
}
1817
return val;

0 commit comments

Comments
 (0)