上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: org.apache.commons.lang.StringUtils中常用的方法,这里主要列举String中没有,且比较有用的方法: 检查字符串是否为空: static boolean isBlank(CharSequence str) 判断字符串是否为空或null; static boolean 阅读全文
posted @ 2021-02-08 10:36 风骚羊肉串 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 在本页中,我们将提供 java 8 Stream sorted()排序的示例。 我们可以按照自然顺序和比较器提供的顺序对流进行排序。 在Java8中,可以使用lambda表达式实例化比较器(Comparator)。 我们还可以颠倒自然顺序和比较器(Comparator)提供的顺序。 自然排序使用Co 阅读全文
posted @ 2021-01-28 17:20 风骚羊肉串 阅读(6345) 评论(0) 推荐(0) 编辑
摘要: 转自:@指尖挡不住流年public static void main(String[] args) { BigDecimal b=new BigDecimal("112"); BigDecimal a=new BigDecimal("1.12").multiply(new BigDecimal(10 阅读全文
posted @ 2021-01-25 18:02 风骚羊肉串 阅读(796) 评论(0) 推荐(0) 编辑
摘要: 输入psvm然后ctrl+j: public static void main(String[] args) {}输入:sout System.out.println(); 阅读全文
posted @ 2021-01-25 17:39 风骚羊肉串 阅读(378) 评论(0) 推荐(0) 编辑
摘要: Map<String, String> map = new HashMap<String, String>();map.put("xiaocui1", "gongchen");map.put("xiaocui2", "daima");map.put("xiaocui3", "xuexi");map. 阅读全文
posted @ 2021-01-25 17:35 风骚羊肉串 阅读(395) 评论(0) 推荐(0) 编辑
摘要: import Java.util.ArrayList;import java.util.List;public class strSplit { public static void main(String args[]) { List<String> listTest1 = new ArrayLi 阅读全文
posted @ 2021-01-25 17:32 风骚羊肉串 阅读(464) 评论(0) 推荐(0) 编辑
摘要: cal1.add(Calendar.DAY_OF_MONTH,1); cal1.add(Calendar.DAY_OF_YEAR,1); cal1.add(Calendar.DATE,1); 就单纯的add操作结果都一样,因为都是将日期+1就没有区别说是在月的日期中加1还是年的日期中加1但是Cale 阅读全文
posted @ 2021-01-25 14:48 风骚羊肉串 阅读(574) 评论(0) 推荐(0) 编辑
摘要: Optional类的使用 JDK8以前,编写代码,通常会出现 NullPointerException (空指针异常),通常情况下我们都是通过 if ... else... 来对对象进行为空判断,然后再进行逻辑处理,代码写起来也比较冗余。 JDK8新增了Optional类,使用该类可以避免我们对空指 阅读全文
posted @ 2021-01-23 17:03 风骚羊肉串 阅读(294) 评论(0) 推荐(0) 编辑
摘要: System一个很牛掰的类 ,位于java.lang包下,有很多可以获取到系统底层的东西,现分享一二: System类本意就代表系统,系统级的很多属性和控制方法都放置在该类的内部。该类位于java.lang包。 currentTimeMillis方法 public static long curre 阅读全文
posted @ 2021-01-23 16:33 风骚羊肉串 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1.简介 首先什么是动态SQL? 动态SQL有什么作用? 传统的使用JDBC的方法,相信大家在组合复杂的的SQL语句的时候,需要去拼接,稍不注意哪怕少了个空格,都会导致错误。Mybatis的动态SQL功能正是为了解决这种问题, 其通过 if, choose, when, otherwise, tri 阅读全文
posted @ 2021-01-23 13:51 风骚羊肉串 阅读(84) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页