‘<>‘ cannot be used with anonymous classes

'<>' cannot be used with anonymous classes

'<>'不能与匿名类一起使用

复制代码
Description	Resource	Path	Location	Type
'<>' cannot be used with anonymous classes	SearchHitSupport.java	/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core	line 95	Java Problem

java - Compile error: "'<>' cannot be used with anonymous classes" - Stack Overflow

But the Java compiler gives me the following error message:

复制代码
'<>' cannot be used with anonymous classes

Is there a fundamental reason for this? Or did the just skip the feature in JDK 7, maybe they do it in 8?

'<>' operator is not allowed for source level below 1.7_spencer_tseng的博客-CSDN博客

相关推荐
TeDi TIVE3 分钟前
mysql-connector-java 和 mysql-connector-j的区别
android·java·mysql
SimonKing9 分钟前
国产开源富文本编辑器 wangEditor,本姓编辑器
java·后端·程序员
剑飞的编程思维11 分钟前
系统架构评审报告(正式交付模板)
java·系统架构
XS03010615 分钟前
Java 基础(六)封装类 Object类
java·jvm·python
2301_7926748615 分钟前
java学习day31 (docker)
java·学习·docker
Han.miracle16 分钟前
Nacos的使用快速上手
java·spring cloud
007张三丰17 分钟前
系统架构设计师-以“云服务”主题为例的范文参考
java·开发语言·网络·软考高级·云服务·软考论文·论文范文
鬼蛟18 分钟前
Sentinel
java·开发语言·数据库
GoodStudyAndDayDayUp25 分钟前
优化java加权方法
java·优化java加权方法
阿丰资源25 分钟前
基于SpringBoot+MySQL的时装购物系统(附源码)
java·spring boot·mysql