- 博客(3)
- 收藏
- 关注
原创 一个示例带你掌握Java Stream中的FlatMap
一个例子解释Java Stream中的FlatMap我们可以通过下面的例子来更好的理解flatmap的使用首先定义两个类型/** * 学生类 */@Data@AllArgsConstructorpublic static class Student{ /** * 姓名 */ private String name;}/** * 班级类 */@Data@AllArgsConstructorpublic static class MainCla
2021-05-19 17:24:41
3312
1
原创 Tomcat启动报错:ClassFormatException: Invalid byte tag in constant pool: 19
一. 遇到问题❓❗️先放一张tomcat启动时报错的日志❗️我所用的JDK版本为:jdk8tomcat版本为:tomcat 7.xx从字面以后可以看到 Unable to process Jar entry xxx for annotations (无法处理注释的xx Jar包的条目)对应的报错是**ClassFormatException **( 类格式异常)这个异常继承了RuntimeException(运行时异常)官方解释如下:Thrown when the BCEL att
2020-08-24 15:04:50
7096
原创 函数式接口的的使用
函数式接口的使用Function、Predicate、Supplier、Consumer介绍什么是函数式接口接口中只有一个抽象方法(不包括默认、静态)如何去定义一个函数式接口@FunctionalInterface 该注解的作用:约束接口中只能有一个抽象方法定义一个接口 提供一个抽象方法@FunctionalInterfaceinterface Cal{ int calOperation(int a,int b);}Lambda表达式的格式(参数) 调用方法、传递参数
2020-07-28 16:32:07
1623
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人