12 2021 档案
摘要://字符串-->字符串数组 String str = "11,22"; String[] split = str.split(","); String strArr = Arrays.toString(split); //字符串数组-->字符串 String[] strArr2 = {"AA","B
阅读全文
摘要:date.after(date2)前者大,返回true,否则返回false,date.before类似date.compareTo(date2)前者大,返回大于0的数,后者大,返回小于0的数,相等返回0
阅读全文
摘要:使用String.format() int number = 214; String str = String.format("%08d", number); 使用DecimalFormat String FORMAT_NUM = "00000000";//位数 DecimalFormat form
阅读全文
摘要:若使用net.sf.json //字符串转json JSONObject strJson = JSONObject.fromObject(str); //对象转json JSONObject userJson = JSONObject.fromObject(user); //list转json JS
阅读全文
摘要:/** * 获取日期的最大时间 * @param date * @return date */ public static Date getMaxTime(Date date){ Calendar cal = Calendar.getInstance(); cal.setTime(date); ca
阅读全文
摘要:<select id="selectId"> <option value="orange">橙色</option> <option value="yellow">黄色</option> </select> 获取value值 var color = $("#selectId").val(); var
阅读全文
摘要:1、Collections.sort() //升序排列 Collections.sort(list, new Comparator<Student>() { public int compare(Student s1, Student s2) { return s1.getAge().compare
阅读全文
摘要:SQL中CONCAT()、CONCAT_WS()和GROUP_CONCAT()函数的用法CONCAT()函数语法:CONCAT(str1, str2, ...)将多个字符串连接成一个字符串SELECT CONCAT(id, name, age) FROM tb_user;结果: CONCAT_WS(
阅读全文