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

相关推荐
wuqingshun3141595 小时前
RabbitMQ 中无法路由的消息会去到哪里?
java
thefool1122665 小时前
Java 方法重载
java
这不小天嘛12 小时前
JAVA八股——J集合篇
java·开发语言
什巳15 小时前
JAVA练习278- 和为 K 的子数组
java·学习·算法·leetcode
豆瓣鸡15 小时前
RocketMQ学习-Spring Boot消息实践
java·spring boot·rocketmq
wuqingshun31415915 小时前
说一下mysql的覆盖索引
java
罗超驿16 小时前
2.算法效率的核心密码:时间复杂度和空间复杂度详解
java·数据结构·算法
栈溢出了16 小时前
Redis 分片集群与哈希槽笔记
java·redis·笔记·spring
遨游DATA17 小时前
Spring Boot 启动失败排查:如何区分多 Bean 冲突与清理阶段异常
java·spring boot·后端
wabs66617 小时前
关于单调栈【力扣739.每日温度的思考】
java·开发语言