title: java check values
body: <p>I am trying to search if char from alpabet array is equal to the textCharArray's element. And if so do some math: char number from alphabet to add to arrayList value. But I getting an error:</p>
  
  <p><strong>java.lang.ArrayIndexOutOfBoundsException</strong></p>
  
  <p>The problem should be in for cicles. But I don't know how to fix it corectly.
  The 
  Code:</p>
  
  <pre><code>                outputText.setText("");
              inputTextString = inputText.getText().toString().replace(" ", ""); //panaikinami tarpa
              char[] textCharArray = inputTextString.toCharArray(); //seka paverciama char masyvu
              int l = textCharArray.length;
              char[] alphabet = {'A','B','C','D','E','F','G','H','I','K','L','M','N','O','P','Q','R','S','T','V','X','Y','Z'};
              int alpLenght = alphabet.length;
              System.out.println(alpLenght);
              stringKey = inputKey.getText().toString();
              int k = Integer.parseInt(stringKey);
              List&lt;Integer&gt;keyList = new ArrayList&lt;Integer&gt;();
              while(k &gt; 0){
                  keyList.add(k%10);
                  k = k /10;
              }
              Collections.reverse(keyList);
              int j = 0;
              int temp;
              for(int i = 0; i &lt;= l; i++){
                  for(int ii = 0; ii &lt; alpLenght; i++){
                      if(j &lt; keyList.size()){
                          if(textCharArray[i] == alphabet[ii]){
                              temp = ii + keyList.get(j);
                              System.out.println("Uzkoduotas: " + temp);
                              }
                          j++;
                      }
  
  
  
                  else {
                      j = 0;
                          if(textCharArray[i] == alphabet[ii]){
                              temp = ii + keyList.get(j);
                              System.out.println("Uzkoduotas: " + temp);
                          }
                      }
                      j++;
                  }
  </code></pre>