title: How to solve Permutations on String element in java?
body: <h1>Problem Description</h1>
  
  <p>Given an integer array containing digits from [0, 99], the task is to print all possible letter combinations that the numbers could represent. A mapping of digit to letters (just like on the telephone buttons) is being followed. Note that 0 and 1 do not map to any letters. All the mapping are like:<a href="https://www.geeksforgeeks.org/convert-number-to-words/" rel="nofollow noreferrer">enter link description here</a>
  Here is my design:
  First,default the String array and input the elements to it;like:
  Second,default the show method like:
  Third,config the mapping about String array and number
  Four,Use Scanner method;</p>
  
  <p>the show result like
  input:Array[]={99,2,3};
  output:HAD HAE HAF HBD HBE HBF HCD HCE HCF EAD EAE EAF EBD EBE EBF ECD ECE 
  ECF LAD LAE LAF LBD LBE LBF LCD LCE LCF LAD LAE LAF LBD LBE LBF LCD 
  LCE LCF OAD OAE OAF OBD OBE OBF OCD OCE OCF </p>
  
  <pre><code>import java.io.*;
  import java.util.*;
  
  public class GFG
  {
  // Function to return a vector that contains
  // all the generated letter combinations
  static ArrayList&lt;String&gt; letterCombinationsUtil(int[] number, int n,
                                                  String[] table)
  {
      // To store the generated letter combinations
      ArrayList&lt;String&gt; list = new ArrayList&lt;&gt;();
  
      Queue&lt;String&gt; q = new LinkedList&lt;&gt;();
      q.add("");
  
      while(!q.isEmpty())
      {
          String s = q.remove();
  
          // If complete word is generated
          // push it in the list
          if (s.length() == n)
              list.add(s);
          else
          {
              String val = table[number[s.length()]];
              for (int i = 0; i &lt; val.length(); i++)
              {
                  q.add(s + val.charAt(i));
              }
          }
      }
      return list;
  }
  
  // Function that creates the mapping and
  // calls letterCombinationsUtil
  static void letterCombinations(int[] number, int n)
  {
      // table[i] stores all characters that
      // corresponds to ith digit in phone
      String[] table = { "", "", "abc", "def", "ghi", "jkl",
              "mno", "pqrs", "tuv", "wxyz" };
  
      ArrayList&lt;String&gt; list =
              letterCombinationsUtil(number, n, table);
  
      // Print the contents of the list
      for (int i = 0; i &lt; list.size(); i++)
      {
          System.out.print(list.get(i) + " ");
      }
  }
  
  public static void main(String args[])
  {
      int[] number = { 2, 3, 7, 9};
      int n = number.length;
      letterCombinations(number, n);
  }
  </code></pre>
  
  <p>}
     input:</p>