public Vector(double comp[]) throws NegativeArraySizeException {
  int n=comp.length;
  if (n <= 0)   throw new NegativeArraySizeException("Vector components cannot be empty");
  components=new double[n];
  System.arraycopy(comp,0,components,0,n);
}

public Vector ( double comp [ ] ) throws NegativeArraySizeException { int n = comp . length ; if ( n <= 0 ) throw new NegativeArraySizeException ( "Vector components cannot be empty" ) ; components = new double [ n ] ; System . arraycopy ( comp , 0 , components , 0 , n ) ; }
create a vector of given dimension . note : the supplied array of components must not be changed .
