随笔分类 - java基础
摘要:当远程调用接口时,需要处理返回的值,有时候需要转为json 例如: HashMap<Object, Object> mapTemp = new HashMap<>(); mapTemp.put("classId", classId); mapTemp.put("companyId", company
阅读全文
摘要:String 转 Integer: 方式一:用Integer.parseInt()这个方法 Integer total = Integer.parseInt(data.getStr("total")); 接收的参数可以用int,也可以用Integer 例如 int total= Integer.pa
阅读全文
摘要:以下是自己用到的: 一. 先来看一下源码: public static boolean isEmpty(String str) { return str == null || str.length() == 0; } public static boolean isNotEmpty(String s
阅读全文