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

相关推荐
欧恩意5 小时前
【Tools】Java反汇编工具推荐
java·汇编
寻星探路5 小时前
【JVM 终极通关指南】万字长文从底层到实战全维度深度拆解 Java 虚拟机
java·开发语言·jvm·人工智能·python·算法·ai
lbb 小魔仙5 小时前
【Java】Java 实战项目:手把手教你写一个电商订单系统
android·java·python
星河耀银海5 小时前
Java安全开发实战:从代码防护到架构安全
java·安全·架构
青云交5 小时前
Java 大视界 -- 基于 Java 的大数据可视化在城市水资源管理与节水策略制定中的应用
java·java 大数据·java 大数据可视化·城市水资源管理·spark 数据清洗·echarts 热力图·管网漏损控制
紫陌涵光6 小时前
112. 路径总和
java·前端·算法
workflower6 小时前
多变量时间序列预测
java·hadoop·nosql·需求分析·big data·结对编程
Volunteer Technology7 小时前
DynamicTP动态线程池(四)
java·spring boot·后端·spring
野犬寒鸦7 小时前
从零起步学习并发编程 || 第九章:Future 类详解及CompletableFuture 类在项目实战中的应用
java·开发语言·jvm·数据库·后端·学习