12 2021 档案

摘要:今天记录一下try,catch,finally中的return。 先看一段代码: 下面代码的运行结果为? public class test { public int add(int a,int b) { try { return a+b; }catch(Exception e){ System.o 阅读全文
posted @ 2021-12-27 22:56 单挑啊dm 阅读(146) 评论(0) 推荐(0)
摘要:MySQL中concat函数 使用方法:concat(str1,str2,…) 返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。 mysql> select concat('11','22','33');+ +| concat('11','22','33') |+ 阅读全文
posted @ 2021-12-10 13:59 单挑啊dm 阅读(55) 评论(0) 推荐(0)
摘要:LocalDateTime 转 Date Date startDate=new Date(); LocalDateTime localDateTime = startDate.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime() 阅读全文
posted @ 2021-12-10 00:03 单挑啊dm 阅读(184) 评论(0) 推荐(0)
摘要:1. 此注解会生成equals(Object other) 和 hashCode()方法。2. 它默认使用非静态,非瞬态的属性3. 可通过参数exclude排除一些属性4. 可通过参数of指定仅使用哪些属性5. 它默认仅使用该类中定义的属性且不调用父类的方法6. 可通过callSuper=true解 阅读全文
posted @ 2021-12-01 00:30 单挑啊dm 阅读(116) 评论(0) 推荐(0)
摘要:@Accessors用于生成getter和setter方法时的一些设置,Accessors注解类中有三个属性 flent,chain,prefix 此注解标注ElementType.TYPE和ElementType.FIELD(可用于类及属性字段) (1)Flent=true;生成的getter方法 阅读全文
posted @ 2021-12-01 00:21 单挑啊dm 阅读(3925) 评论(0) 推荐(0)