public static int size(double[] array){
  return Array.getLength(array);
}

public static int size ( double [ ] array ) { return Array . getLength ( array ) ; }
allows arrays to behave similar to collections .
