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

相关推荐
m0_716255007 分钟前
第一部分 数据开发 面试全题 模拟口述版(自问自答)
java·数据库·面试
SuperherRo31 分钟前
服务攻防-Java组件安全&FastJson&高版本JNDI&不出网C3P0&编码绕WAF&写入文件CI链
java·安全·fastjson·waf·不出网·高版本·写入文件
丑八怪大丑35 分钟前
SQL数据类型
java·数据库·sql
Nyarlathotep011342 分钟前
并发集合类(3):LinkedBlockingQueue
java·后端
李温候1 小时前
互联网大厂Java求职者面试全攻略
java·数据库·面试·orm·构建工具·web框架·互联网大厂
摇滚侠1 小时前
软件开发外包项目组,如何提高代码质量和开发效率
java·开发语言·前端·ide·intellij-idea
bzmK1DTbd1 小时前
MongoDB聚合框架:Java驱动下的数据聚合操作
java·python·mongodb
IT空门:门主1 小时前
spring ai alibaba -流式+invoke的人工介入的实现
java·后端·spring
TE-茶叶蛋1 小时前
mvn test
java