The ArrayList class doesn't override the [] operator. Hence you can't use it.

Also, the ArrayList class doesn't have, at least not a public or protected one, called length. It has a method...