Java array problems. Could anyone help me?
Well, in Java everything is based on classes and inheritance, so there is a class called Exception which has job to tell you that you are making a mistake (your code has a bug). It means that you're trying to access element which is not in the bounds of your array.
Most frequently programmers make mistakes like yours because they don't know that when your working with arrays the index's start from 0 and the last element's index is n-1 where n is the number of elements in your array. So my advice is try your same code but lower the indexes for one and start from 0.
So to summarize, Array index out of bounds exception means that you're trying to access element whose index is out of the bounds of your array, to fix that count on the fact that there is one index less than the number of elements.