java util

取map key呈現

1
2
3
4
5
6
 Set set = LN1015BK1Map.keySet();//1.利用ID取LN1015BK1Map值
        Set set2 = L1011BK2Map.keySet();
        List<String> keyList1 = new ArrayList<String>(set);
        for(String key:keyList1){
            sysOut("LN1015BK1Map key:"+key+"_");
        }
1
2
3
4
5
6
7
8
9
10
11
12
 /*
	 *  scale 小數幾位
	 *  ex:toString(new BigDecimal("0.289"),5) ==>0.28900
	 */
	public static String toString(BigDecimal b, int scale) {
	        if (b == null) {
	            return null;
	        }
	        b = b.setScale(scale, RoundingMode.HALF_UP);
	        System.out.println("x setScale:["+b.toPlainString()+"]");
	        return b.toPlainString();
	}

Be the first to comment on "java util"

Leave a comment

Your email address will not be published.


*