hashmap的问题
我在做试验时,遇到这样的问题,希望大家帮忙看看....
package com.club.common;
import java.util.HashMap;
import java.util.LinkedHashMap;
public class Constants {
public static final String CLUB_XQ_AQ_HZ = "AQ ";//杭州市
public static final String CLUB_XQ_CQ_QZ = "CQ ";//衢州市
public static final String CLUB_XQ_DQ_HZ = "DQ ";//湖州市
public static final String CLUB_XQ_EQ_JX = "EQ ";//嘉兴市
public static final String CLUB_XQ_KQ_NB = "KQ ";//宁波市
public static final String CLUB_XQ_FQ_SX = "FQ ";//绍兴市
public static final String CLUB_XQ_GQ_TZ = "GQ ";//台州市
public static final String CLUB_XQ_BQ_WZ = "BQ ";//温州市
public static final String CLUB_XQ_HQ_LS = "HQ ";//丽水市
public static final String CLUB_XQ_IQ_JH = "IQ ";//金华市
public static final String CLUB_XQ_JQ_ZS = "JQ ";//舟山市
public static final LinkedHashMap CLUB_XQ_HASHMAP = new LinkedHashMap();
static{
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_AQ_HZ), "杭州市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_CQ_QZ), "衢州市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_DQ_HZ), "湖州市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_EQ_JX), "嘉兴市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_KQ_NB), "宁波市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_FQ_SX), "绍兴市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_GQ_TZ), "台州市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_BQ_WZ), "温州市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_HQ_LS), "丽水市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_IQ_JH), "金华市 ");
CLUB_XQ_HASHMAP.put(String.valueOf(CLUB_XQ_JQ_ZS), "舟山市 ");
}
}
如果我在一张表上写了个列,列名叫city,如果我在city列中有 AQ,CQ等,请问怎么样可以在页面上显示出汉字的列啊
------解决方案--------------------CLUB_XQ_HASHMAP.get( "AQ ");
CLUB_XQ_HASHMAP.get( "CQ ");