When I type my declare statement:
Vector<double> distance_vector = new Vector<double>();
I receive the error (underlining 'double' in both cases):
Syntax error on token "double", Dimensions expected after this token
What am I doing wrong here?
When I type my declare statement:
Vector<double> distance_vector = new Vector<double>();
I receive the error (underlining 'double' in both cases):
Syntax error on token "double", Dimensions expected after this token
What am I doing wrong here?
 
    
    You cannot use primitives as type parameters. You either need to use a Vector<Double> (or even better, List<Double>) or use one of the Trove collections if you really need to avoid the performance hit of boxing/unboxing.
The best approach is to use Vector as this class wraps a value of the primitive type double in an object which contains a single field whose type is double. Also, it allows you to convert with string type.
 
    
    You should go with:
double [n] vector;
Replace "n" for the number of positions your vector will have. You can make it bigger, if you want and I'm not mistaken. If you want the size of your vector not to be fixed, you should use an Array or ArrayList instead of a vector.
 
    
    Use this:
Vector < Double > distance_vector = new Vector < Double >();
It is working.
 
    
    