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

相关推荐
命运之光1 分钟前
【C语言完整代码】就诊信息管理系统
java·c语言·开发语言
marvelyu1 小时前
每天10分钟学会OceanBase系列(Day 20):跨机房容灾实战——构建多数据中心高可用架构
java·大数据·数据库
AI人工智能+电脑小能手2 小时前
大白话说Java设计模式-04-工厂方法模式(业务实战篇)
java·设计模式·工厂方法模式·架构设计·代码解耦
BUG指挥官2 小时前
Sa-Token和Spring Security对比
java·后端·spring
小当家.1052 小时前
深入理解 ReAct Agent:从原理到 Java 实战
java·react.js·agent·react·架构设计·agent设计
geminigoth2 小时前
Spring AI Alibaba 入门开发一(备份)
java·人工智能·spring
Hammer_Hans3 小时前
DFT笔记98
java·开发语言·数据库
古法安卓3 小时前
Android-DeviceStorageMonitorService 流程分析
java·面试·android studio
Java内核笔记3 小时前
Spring Boot 4 拥抱 Jackson 3:包名迁移、配置改名与自动配置源码剖析
java·后端
程序员黑豆4 小时前
什么是JDK以及JDK都由哪些部分组成呢
java·前端·ai编程