String处置

String处理??1 获取字符串token的性能比较,输出为250,31。StringTokenizer远胜于split的方式。?UserDO userD

String处理

?

?

1 获取字符串token的性能比较,输出为250,31。StringTokenizer远胜于split的方式。

?

UserDO userDO = new UserDO();userDO.setAddress("{:[][];}adfadf,,}");userDO.setAge(123123);JSONObject jsonObject = JSONObject.fromObject(userDO);String temp = jsonObject.toString();System.out.println(temp);jsonObject.put("jsonkey", "jsonvalue");temp = jsonObject.toString();System.out.println(temp);JSONObject.fromObject(temp).get("address");System.out.println(temp);
?

?

?

?

?

?

?

?

?

?

?

?