I come from a php background and in php, there is an array_size() function which tells you how many elements in the array are used.
array_size()
Is there a similar
In java there is a length field that you can use on any array to find out it's size:
length
String[] s = new String[10]; System.out.println(s.length);