Map<String,Integer> map = new HashMap<String, Integer>();
        map.put("A", 56);
        map.put("B", 85);
        map.put("C", 20);
        map.put("D", 90);
        map.put("E", 60);
        map.put("F", 50);

        for (Map.Entry<String, Integer> entry : map.entrySet()) {
                if(entry.getValue() > 55 && entry.getValue() < 65){
                    System.out.println("The student "+entry.getKey()+" has
a score between 55 and 65");
                }
            }

2012/1/6 ABHISHEK TRIPATHI <[email protected]>

> Hey Dev,
>
> I'm facing probem with the Hashmap, can you please help on this ?
>
> HashMap:
>
> Key= collection of Student Names( A,B,C,D,A,D,Q)
>
> Values= Marks (ex. 88,34,53,12,44,56,78,87,54)
>  Can you please advise best way to get all the Students who have marks
> between 55 to 65?
>
> thanks,
> Ami
>
>  --
> You received this message because you are subscribed to the Google Groups
> "JPassion.com: Java Programming" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/jpassion_java?hl=en.
>



-- 
Atentamente

Alfonso Bullon Vallejo

-- 
You received this message because you are subscribed to the Google Groups 
"JPassion.com: Java Programming" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jpassion_java?hl=en.

Reply via email to