title: Frequency counting at two dimensional array
body: <p>I am trying to make vigenere cipher attack. I have encrypted text with an unknown key length. I am solving algorith which finds the length of the key (i am spliting text on blocks where i am counting index of coincidence). 
  For counting frequencies earlier i used hash map. but now i have 2 dimensional array, and after all my map is empty, help me to find my problem, thanks :) Afrer all i am getting smth like {};
  here is my code: </p>
  
  <pre><code>public static String count_coincidence (char[][] text){
      int p=0;
      HashMap&lt;Character,Double&gt; map = new HashMap&lt;Character,Double&gt;();
      int a =(int)('а');
      char[] dictionary = new char[32];
      for(int x=0;x&lt;dictionary.length;x++){
          dictionary[x]=((char)(a+x));
      }
      for(int i=0;i&lt;text.length;i++){
          for(int j=0;j&lt;text.length;j++){
              for(int l=0;l&lt;text.length;l++){
  
                  if(text[i][j]==dictionary[l]){
                      char c = text[i][j];
                      Double val = map.get(new Character(c));
                      if(val != null){
                          map.put(c, new Double( (val + 1) ) );
                      }
                      if(val==null){
                          map.put(c,1.0);
                      }
                  }
              }
  
  
          }
      }
  
      String d=map.toString();
      return d;
  }
  </code></pre>
  
  <p>And after each iteraion inside loop , i should to save somewhere the value of map.</p>