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

相关推荐
rannn_1111 分钟前
【力扣hot100】链表专题|160、206、234、141、142
java·算法·leetcode·链表·面试·开发
IKUN家族1 小时前
Spring IoC&DI
java·spring·rpc
山荷枝3 小时前
03-框架--Spring
java·后端·spring
ChaHae-In3 小时前
SpringBoot统一功能处理
java·spring boot·后端
coder!mq4 小时前
说几个常见的语法糖?
java·开发语言·算法
gugucoding4 小时前
38. 【Java】Stream API(下):高级操作与性能
java·开发语言
心平气和量大福大4 小时前
android-实例-蒲公英-更新与安装-5-签名与生成APK
android·java·开发语言
952365 小时前
Spring-cloud配置中心
java·spring·spring cloud·微服务
ydd1001005 小时前
寻找两个正序数组的中位数 Java 题解,二分分割详解
java·开发语言
真上帝的左手6 小时前
10. 软件设计&架构-Spring Security 7 整合CAS SSO 单点登录
java·spring·架构·sso