diff --git a/Conversions/HexaDecimalToDecimal.java b/Conversions/HexaDecimalToDecimal.java index fe9aea3b..24c4e0a8 100644 --- a/Conversions/HexaDecimalToDecimal.java +++ b/Conversions/HexaDecimalToDecimal.java @@ -11,8 +11,7 @@ public class HexaDecimalToDecimal { int val = 0; for (int i = 0; i < hex.length(); i++) { - char c = hex.charAt(i); - int d = digits.indexOf(c); + int d = digits.indexOf(hex.charAt(i)); val = 16*val + d; } return val;