TreeMap

Check if a particular value exists in Java TreeMap example

Want to learn quickly?
Try one of the many quizzes. More than Java 400 questions with detailed answers.

Add Comment

  • TreeMap treeMap = new TreeMap();

    Hi what if I have
    [code]
    treeMap.put(“1″,”John”,”player”);
    treeMap.put(“2″,”John”,”singer”);
    treeMap.put(“3″,”Vicky”,”singer”);
    [/code]
    and want to check if one of the values contains string “singer”.
    Is it possible to do that?

Sponsors

Facebook Fans