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

相关推荐
Despacito10068 分钟前
Java后端性能探查工具速查表
java·开发语言
蓝桉柒727 分钟前
下载idea,用idea输入一个程序
java·ide·intellij-idea
蓝桉柒71 小时前
java字面量,变量
java
典典分享指南1 小时前
一品牌多产品线的 GEO 内容矩阵:从策略到落地
java·c#·bash·symfony
用户094248568032 小时前
第3章:OpenJDK从源码到字节码——Class 文件与 javac 管线
java·jvm
azhou的代码园2 小时前
基于RFM模型的中小型企业客户管理系统
java·人工智能·spring boot·毕业设计
君顾12 小时前
酒吧点餐小程序系统开发实战:从架构设计到上线全流程指南
java·开发语言·酒吧
子非鱼a2 小时前
【WEB】[SWPU2019]Web1
java·服务器·前端
花生了什么事o3 小时前
自定义Spring Boot Starter全流程
java·spring boot·后端
torpidcat4 小时前
ruoyi-vue-pro 若依芋道 java springboot +mybatis 生日查询相关
java·vue.js·spring boot