5 Einträge, 1 Seite |
public static final String[] stacks = {"Com", "Sys", "Diag", "IO"};
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;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.util.Map;
import java.util.HashMap;
public final class Foo {
private Foo() {
}
public static final Map<String, String> bar = new HashMap<String, String>();
static {
bar.put("rhabarber", "quark");
bar.put("bananen", "brei");
}
}
5 Einträge, 1 Seite |