title: Replacing and converting strings
body: <p>Have a code that does something like decrypting where a string is introduced and then is decrypted in a double number, the letters can be from a to j and respectively a = 0, b = 1 ... j = 9.
  The program works, all I want to know maybe there is a easiest way to achieve this ? I am new in java and for the moment don't know all the features.
  Code:</p>
  
  <pre><code>import java.util.Scanner;
  import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  import java.lang.Double;
  public class Decrypt 
  {   
      private static String conversionTable[][] = {
          {"a", "0"},
          {"b", "1"},
          {"c", "2"},
          {"d", "3"},
          {"e", "4"},
          {"f", "5"},
          {"g", "6"},
          {"h", "7"},
          {"i", "8"},
          {"j", "9"},
      };
      private static Scanner scanner;
  
      public static double decrypt(String encryptedNumber) 
      {
          String c = "";
          int i = 0;
          String[] s = encryptedNumber.split("");
  
          for(int j = 0; j &lt; 2; j++) {
              if(c.length() == s.length)
                  break;
  
              for(int k = 0; k &lt; 9; k++) {
                  if(c.length() == s.length)
                      break;
                  if(conversionTable[k][j].equalsIgnoreCase(s[i])){
                       c += k;
                          i++;
                  }else if(s[i].equalsIgnoreCase(".")){
                      c += ".";
                      i++;
                  }
              }
              j--;
          }
  
          double d = Double.parseDouble(c);
          return d;
      }
  
      public static void main(String arg[])
      {   
          scanner = new Scanner(System.in);
          System.out.println("Enter the string to decrypt:");
          String input=scanner.next();
          System.out.println("Number after decryption is:"+decrypt(input));
      }
  }
  </code></pre>