HashMap存值

package com.exmple.tool;

import java.util.HashMap;

public class UserTool {
	public static HashMap<String, String> getUrl() {
		HashMap<String, String> ha = new HashMap<String, String>();
		ha.put("资讯",
				"http://www.oschina.net/action/api/news_list?catalog=1&pageIndex=");
		ha.put("热点",
				"http://www.oschina.net/action/api/news_list?catalog=4&pageIndex=");
		ha.put("博客",
				"http://www.oschina.net/action/api/blog_list?type=latest&pageIndex=");
		ha.put("推荐",
				"http://www.oschina.net/action/api/blog_list?type=recommend&pageIndex=");
		return ha;
	};
}

  

原文地址:https://www.cnblogs.com/jsonfan/p/5356829.html