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

相关推荐
AI开源软件1 小时前
SpringCloud+Nacos 业务协同落地:业务调用与集成中心远程管理如何分别配置
java·spring boot
sharemylove10 小时前
Java集合框架全面详解
java·开发语言·经验分享·笔记·学习
FYKJ_201011 小时前
springboot众创项目团队管理系统94666-计算机课程设计、毕业设计
java·vue.js·spring boot·后端·python·spark·课程设计
摇滚侠12 小时前
《On Java 中文版 基础卷》阅读笔记 内部类 20
java·笔记·python
FYKJ_201015 小时前
springboot贫困生认定管理系统59009-计算机毕业设计、课程设计
java·javascript·vue.js·spring boot·后端·django·课程设计
考虑考虑15 小时前
JDK27中的结构化并发
java·后端·java ee
吃我一窝jio17 小时前
Java IO流核心分类与应用
java·开发语言·笔记
这个昵称不容易18 小时前
租房管理系统设计与实现:16 张表、185 个接口的 SpringBoot 前后台项目
java·springboot·毕设
nice_lcj52020 小时前
Spring 事务:声明式事务怎么生效
java·spring·面试·事务·transactional·传播机制
沐知全栈开发20 小时前
基于Flask的班级信息与班务管理系统设计与实现-毕业设计
java·flask·课程设计