Link to home
Start Free TrialLog in
Avatar of perissf
perissfFlag for Switzerland

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...
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of perissf

ASKER

wow!!
:-)