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

相关推荐
o***59272 分钟前
spring注入static属性
java·后端·spring
风象南6 分钟前
Spring Boot实现HTTPS双向认证
java·spring boot·后端
青春不流名14 分钟前
Java List初始化的例子
java·windows·list
4***172714 分钟前
【MySQL篇】使用Java操作MySQL实现数据交互
java·mysql·交互
sheji341617 分钟前
【开题答辩全过程】以 基于Spring Boot的流浪动物救助系统设计为例,包含答辩的问题和答案
java·spring boot·后端
W***r2623 分钟前
VScode 开发 Springboot 程序
java·spring boot·后端
MacroZheng1 小时前
取代Navicat!全新一代数据库管理工具来了,超级智能!
java·后端·mysql
w***i2941 小时前
Spring Boot实现定时任务
java·spring boot·后端
i***27951 小时前
springboot集成onlyoffice(部署+开发)
java·spring boot·后端