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

相关推荐
文子越来越强8 分钟前
【双因子认证】拦截注解@MFACheck 接入指南(其他微服务如何用)
java
ZGG00329 分钟前
线程池详解:从 7 大参数到生产避坑
java·数据库·后端
迪康Defender34 分钟前
公用电脑责任追溯难?迪康端点安全一体化管理系统用户模式详解
java·运维·开发语言·网络·其他·安全
京师20万禁军教头1 小时前
47-常用类-八大包装类(Wrapper Classes)
java
come112341 小时前
剪映零基础教程
java·linux·运维
16月6日-晴1 小时前
Java面向对象——接口
java·开发语言
苏生Susheng2 小时前
【软件实施】Windows 服务器运维实战
java·运维·服务器·windows·spring boot·javaweb·实施
Java小白笔记2 小时前
Java 实现 ZIP 压缩包生成方案
java·开发语言·网络·7-zip
霸道流氓气质3 小时前
Spring AI 多模态开发指南:图片理解与语音合成
java·人工智能·spring
en.en..3 小时前
Linux mmap 内存映射深度解析:基于帧缓冲 /dev/fb0
java·服务器·前端