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.
Is there a similar method for a String[]
array? Thanks.
Yes, .length
(property-like, not a method):
String[] array = new String[10];
int size = array.length;