how to get a set from a map in java

how to get a set from a map in java
refer t‮‬o:lautturi.com
/**
 * @author lautturi.com
 * Java example: how to get a collection from a map in java
 */

import java.util.*;

public class Lautturi {
	
	public static void main(String[] args) {

		Map<Integer, String> map = new HashMap<Integer, String>() {{
			put(5,"Apple");
			put(7,"Banana");
			put(12,"Cherry");
			put(33,"Orange");
			put(23,"Lautturi");
	    }};
	    Collection values = map.values();
		System.out.println(values);
        
	}
}

output:

[Orange, Apple, Banana, Lautturi, Cherry]
Created Time:2017-09-11 22:17:54  Author:lautturi