Using collections to get the max value from a hash map

Discussion in 'Software' started by refresher, Feb 14, 2006.

  1. refresher

    refresher Private E-2

    Im trying to use Collections to get the maximum value of a hash map where the hash map is made up of strings for keys, and doubles for values like below
    {wednesday=1.23483,...}

    I am trying to use the method max() from Collections, but not sure how it should be used. This is what i am doing

    Code:
    Collection map = map1.values();
    Collections col;
    System.out.println(col.max(c));
    
    I dont know what to initialise col to however, can anybody help me with this?
    Thanks
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds