Outils pour utilisateurs

Outils du site


lang:java:dictionary

for each

for (Enumeration e = propList.keys(); e.hasMoreElements();) {
    String key = (String)e.nextElement();
    String value = (String)propList.get(key);
}

keys de Hashtable vers string

String.join(", ", hash.keySet())

Enumerable vers Iterable

Pour utiliser String.join avec un dictionnaire par exemple.

  Collections.list(dict.keys());
lang/java/dictionary.txt · Dernière modification : 2020/04/29 22:19 de root