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

相关推荐
武昌库里写JAVA25 分钟前
SpringBoot+Vue 项目介绍
java·javascript·git·sql·ai
学长毕设2 小时前
基于SpringBoot的儿童慈善捐赠管理系统-附源码
java·spring boot·后端
慧一居士2 小时前
@RestControllerAdvice 的注解作用和使用
java
学长毕设3 小时前
基于SpringBoot非遗文化展示与传播平台设计与实现-附源码
java·spring boot·后端
金銀銅鐵4 小时前
用 Swing 重做操作数栈演示
java·jvm·后端
琳少_5 小时前
java程序开发笔记
java·开发语言·数据库·笔记
叼烟扛炮6 小时前
[LangChain] 学习笔记(15):为什么你的重试没用——429、抖动、fallback 与熔断
java·服务器·前端
文丑颜不良啊7 小时前
LeetCode3401~3420题目解析
java·leetcode
文丑颜不良啊8 小时前
LeetCode3421~3440题目解析
java·leetcode
code2cat9 小时前
【随笔】Java客户端选了HTTP/3,怎样知道请求实际走了哪个版本
java·开发语言·http