Thread [Java] statische HashMap (4 answers)
Opened by vayu at 2007-04-23 11:41

vayu
 2007-04-23 12:50
#9988 #9988
User since
2005-01-13
782 Artikel
BenutzerIn
[default_avatar]
habs jetzt so gemacht:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
public final class Constants {

public static final HashMap<String, String> hash = initHash();

public static HashMap<String, String> initHash() {
HashMap<String, String> newHash = new HashMap<String, String>();
newHash.put("a","b");
return newHash;
}
}

View full thread [Java] statische HashMap