title: Filling two-dimensional array by values from EditText
body: <p>I have EditText and array. I want fill array by values from EditText field.
  All the characters are digits. How can I achieve this?
  I've try this:</p>
  
  <pre><code>...
  int [][] a = new int [100][100];
  n=1;//now 1, but this value entered in EditText
  ...
                      if (edit_1.getText().length() &gt; 0) {
                          for (int ii = 0; ii &lt; a.length; ii++) {
                              a[ii][n+1] = Integer.parseInt(String.valueOf(edit_1.getText().charAt(ii)));
                          }
                      }
  ...
  a[1][n+2]=a[1][n+1];
  ...
  </code></pre>
  
  <p><strong>What i am getting in the LogCat:</strong></p>
  
  <pre>
  05-13 23:40:55.046: E/AndroidRuntime(27281): FATAL EXCEPTION: main
  05-13 23:40:55.046: E/AndroidRuntime(27281): Process: aectann.dcsmp, PID: 27281
  05-13 23:40:55.046: E/AndroidRuntime(27281): java.lang.IndexOutOfBoundsException: charAt: 4 >= length 4
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:121)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at aectann.dcsmp.Zhegalkin_polynomial.zheg(Zhegalkin_polynomial.java:230)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at aectann.dcsmp.Zhegalkin_polynomial$1.onClick(Zhegalkin_polynomial.java:122)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.view.View.performClick(View.java:4811)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.view.View$PerformClick.run(View.java:20136)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.os.Handler.handleCallback(Handler.java:815)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.os.Handler.dispatchMessage(Handler.java:104)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.os.Looper.loop(Looper.java:194)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at android.app.ActivityThread.main(ActivityThread.java:5549)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at java.lang.reflect.Method.invoke(Native Method)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at java.lang.reflect.Method.invoke(Method.java:372)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
  05-13 23:40:55.046: E/AndroidRuntime(27281):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
  
  </pre>
  
  <p>121 - function call;</p>
  
  <p>230 - <code>a[ii][n+1] = Integer.parseInt(String.valueOf(edit_1.getText().charAt(ii)));</code></p>