• + 1 comment

    I was doing the same thing and my code was throwing array out of bounds exception. I don't know where I was wrong until I saw your code. It happens to me all the time.