The only properties available (array-specific) are indeed .length
, and an index accessory, for example. [0]
.
Arrays can be used in the new for loop syntax provided by Java 1.5:
for(String s : new String[]{"a", "b", "c"}){
You can also access the array as a list using http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#asList%28T...%29 .
Also see the rest of the Arrays class for many other operations that exist to work directly with arrays. (Here we have a class that works with arrays, and not with an array containing all the useful properties and methods.)
source share