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

相关推荐
大大水瓶37 分钟前
Tomcat
java·tomcat
dustcell.38 分钟前
haproxy七层代理
java·开发语言·前端
游离态指针41 分钟前
以为发消息=下单成功?RabbitMQ从0到秒杀实战的完整踩坑笔记
java
BD_Marathon1 小时前
工厂方法模式
android·java·工厂方法模式
玹外之音1 小时前
Spring AI MCP 无状态服务器实战:构建AI智能用户管理系统
java·后端
java干货1 小时前
Redis 的 ZipList 是什么?它是怎么解决内存碎片问题的?
java
失重外太空啦2 小时前
Tomcat
java·服务器·tomcat
屎到临头想搅便2 小时前
TOMCAT
java·tomcat
Sylvia33.2 小时前
火星数据:解构斯诺克每一杆进攻背后的数字语言
java·前端·python·数据挖掘·数据分析