The method you tried to access wasn't there.
int[] foo = new int[20];
int bar = foo.length(); Here, length shouldn't have the ()
The example above shows one possible cause - without the brackets, the code would work. This is because length isn't a method, but a ?property?. When there is supposed to be a method of that name, check caps/spelling.