From d5c673aa97a20fd43401f698cdf702dcaed8505c Mon Sep 17 00:00:00 2001 From: khaireddine mejri Date: Sat, 19 May 2018 16:20:35 +0200 Subject: [PATCH] Update HexaDecimalToDecimal.java --- Conversions/HexaDecimalToDecimal.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;