随笔分类 -  java基础

摘要:当远程调用接口时,需要处理返回的值,有时候需要转为json 例如: HashMap<Object, Object> mapTemp = new HashMap<>(); mapTemp.put("classId", classId); mapTemp.put("companyId", company 阅读全文
posted @ 2022-08-26 10:47 怎言笑i 阅读(567) 评论(0) 推荐(0) 编辑
摘要:String 转 Integer: 方式一:用Integer.parseInt()这个方法 Integer total = Integer.parseInt(data.getStr("total")); 接收的参数可以用int,也可以用Integer 例如 int total= Integer.pa 阅读全文
posted @ 2022-05-24 11:21 怎言笑i 阅读(1779) 评论(0) 推荐(0) 编辑
摘要:以下是自己用到的: 一. 先来看一下源码: public static boolean isEmpty(String str) { return str == null || str.length() == 0; } public static boolean isNotEmpty(String s 阅读全文
posted @ 2022-03-25 15:15 怎言笑i 阅读(120) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示