一般的方式的使用静态代码块。比如: public final static Map map = new HashMap(); static { map.put("key1", "value1"); map.put("key2", "value2"); } List的话则可以这样定义: public final static List<String> LIST = Arrays.asList("one","two","three");