What does ArrayIndexoutofBoundsException mean here? : <p>Given a string, print the number of alphabets present in the string.
Input:
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows.Each test case contains a single string. 
Output:
Print the number of alphabets present in the string.</p>

<p>This is a question i have been trying to solve this question on eclipse but it keeps throwing ArrayIndexoutOfBoundsException in line 7 of my code. I tried understanding what i've done wrong but i have not been able to. 
Could some one please explain whats wrong here . I have attached the code.</p>

<pre><code>public class solution {
    public static void main(String[] args){
        String s = "baibiasbfi" ;
        int count =0; 
        for(int i=0;i&lt;=s.length();i++){
            char[] a= s.toCharArray();
            if(a[i]&gt;='a'&amp;&amp; a[i]&lt;='z'||a[i]&gt;='A'&amp;&amp;a[i]&lt;='Z')
                count++;}
    System.out.println(count);  
    }
}
</code></pre>
