For keys of a map : HashMap « Collections Data Structure « Java
- Java
- Collections Data Structure
- HashMap
For keys of a map
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class Main {
public static void main(String[] argv) throws Exception {
Map map = new HashMap();
for (Iterator it = map.keySet().iterator(); it.hasNext();) {
Object key = it.next();
}
}
}
Related examples in the same category