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

相关推荐
czc6662 分钟前
【项目实战】Redis+RabbitMQ+MySQL双阈值批量异步落库设计
java
尼古拉斯·纯情暖男·天真·阿玮8 分钟前
[JavaEE初阶] 进程和线程的区别和联系
java·开发语言
苏小瀚23 分钟前
[算法]---分治-快排和归并
java·算法·leetcode
认真敲代码的小火龙26 分钟前
【JAVA项目】基于JAVA的宿舍管理系统
java·开发语言·课程设计
invicinble28 分钟前
关于maven的全域理解
java·spring boot·maven
黑马源码库miui5208630 分钟前
JAVA成人用品商城系统源码微信小程序+h5+安卓+ios
android·java·微信小程序
杰克逊的日记34 分钟前
k8s是怎么管理GPU集群的
java·容器·kubernetes·gpu
山峰哥1 小时前
现代 C++ 的炼金术:铸就高性能与高可维护性的工程实践
java·开发语言·前端·数据结构·c++
27669582921 小时前
闪购商家端 mtgsig
java·python·c#·node·c·mtgsig·mtgsig1.2