‘<>‘ 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博客

相关推荐
總鑽風3 分钟前
单点登录sso 微服务加网关gateway
java·微服务·gateway·jwt·单点登录
blxr_7 分钟前
MySql锁机制
java·开发语言
花里胡哨的菜只因7 分钟前
IDEA 编译 Maven 项目报 Malformed \uxxxx encoding
java·maven·intellij-idea
此生决int9 分钟前
C++快速上手java备战期末考——初识java
java·c++·期末复习
Jing_jing_X14 分钟前
通义灵码Lingma IDE:解决你的提示词焦虑
java·ide·ai
ch.ju18 分钟前
Java Programming Chapter 3——Dynamic acquisition of array
java·开发语言
XS03010621 分钟前
Java Web实现简易CRUD操作笔记
java·前端·笔记
夕除26 分钟前
spring boot 4
java·spring boot·后端
三产31 分钟前
Hermes 教程 03:Skills 系统
android·java·数据库
starsky7623832 分钟前
spring boot——前后端分离
java·spring boot·后端