十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
import com.alibaba.fastjson.JSONObject;
public static void main(String[] args) {
Mapmap = new HashMap();
map.put("workCode","123");
map.put("password","456");
System.out.println("map===>>>>>>>>"+map);//{password=456, workCode=123}
String workCode = map.get("workCode");
String password = map.get("password");
JSONObject jsonObject = new JSONObject();
jsonObject.put("workCode",workCode);
jsonObject.put("password",password);
System.out.println("jsonObject====>>>>>>>>"+jsonObject);//{"password":"456","workCode":"123"}
ArrayList list = new ArrayList<>();
list.add(jsonObject);
JSONObject json = new JSONObject();
json.put("data",list);
System.out.println("json======>>>>>>>>>>"+json);//{"data":[{"password":"456","workCode":"123"}]}
StrBuilder strBuilder = new StrBuilder();
String str= "...,";
strBuilder.append(str);
String substring = str.substring(0, str.length() - 1);
System.out.println(substring);
} 

你是否還在尋找穩(wěn)定的海外服務(wù)器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機房具備T級流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確流量調(diào)度確保服務(wù)器高可用性,企業(yè)級服務(wù)器適合批量采購,新人活動首月15元起,快前往官網(wǎng)查看詳情吧