perissf
asked on
Java find max element in Vector
Hi everybody
I have v = Vector<Double> and I need to check if a certain given index corresponds to the maximum element in the Vector. In other words, I need to check if
v.get(index) == Collections.max(v)
Obviously the line above doesn't compile since I am comparing a Double and a Object...
I have v = Vector<Double> and I need to check if a certain given index corresponds to the maximum element in the Vector. In other words, I need to check if
v.get(index) == Collections.max(v)
Obviously the line above doesn't compile since I am comparing a Double and a Object...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
ASKER