摘要: 字符串String中统计其中出现的次数 ,也许你会使用split获取数组来统计个数,但这没必要,浪费了空间例如:统计出现@的个数long count = str.length()-str.replace("@","").length(); 阅读全文
posted @ 2014-10-29 14:00 吉利来 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 1.验证产品是否签约(签约产品是无线快捷支付)2.添加私钥的时候要经过PSK8编码3、待签名参数 需要经过排序4、sign经过UrlEncord.encord()编码5、根据文档的要求看参数需要传递 阅读全文
posted @ 2014-10-29 10:14 吉利来 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 前提:使用阿里巴巴的JSON包String json = ""; //JSON字符串Map map = JSON.parseObject(json, Map.class);//遍历 Map 使用迭代器Iterator it = map.keySet().iterator();while(it.ha... 阅读全文
posted @ 2014-10-29 10:07 吉利来 阅读(2265) 评论(2) 推荐(0) 编辑