List- private List<String> list=new ArrayList<String>(){
- {
- add("nihao");
- add("wohao");
- add("dajihao");
- }
- };
Map- private static final Map<String, CrawlProjectService> crawlProjectMap = new HashMap<String, CrawlProjectService>();
- static {
- crawlProjectMap.put("a", new ACrawl());
- crawlProjectMap.put("b", new BCrawl());
- }
|