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

相关推荐
2601_9620652531 分钟前
2.启动mysql容器
java·数据库·mysql
2601_9620654932 分钟前
PHP For 循环
android·java·php
2601_9622017239 分钟前
Java进阶,集合,Colllection,常见数据结构
java·数据结构·windows
彷徨而立44 分钟前
【C/C++】多线程读写普通 int 变量的一些问题
java·c语言·c++
卓怡学长1 小时前
w175基于springboot校园二手物品交易平台
java·spring boot·spring·maven·intellij-idea
chen<>1 小时前
malloc 和 free 背后发生了什么?
java·linux·服务器·操作系统
sunzy_泽阳1 小时前
Java + Spring 实现 Hermes Agent:从源码看多模型接入、子代理、人审与沙箱
java
2601_961133281 小时前
同花顺期货通指标公式通达信指标
java
Freak嵌入式1 小时前
树莓派 Pico GPIO 深度解析:从 MCU 架构到寄存器控制,底层原理与实践指南
java·开发语言·科技·单片机·嵌入式硬件·架构
互联网中的一颗神经元1 小时前
09. mheap:全局堆管理器
java·spring·dubbo