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

相关推荐
小盆女神节奶粉4 分钟前
03-登录与RBAC
java·架构
斑鸠喳喳17 分钟前
Spring IoC 之 BeanFactoryPostProcessor
java·spring
长河24 分钟前
PostgreSQL的开发日常
java
xurileidian42 分钟前
第 21 篇 · 边玩边学Python · if elif else 与缩进归属
java·服务器·网络
xieliyu.1 小时前
Nacos 服务注册与发现:让报修服务找到师傅(二)
java·微服务·nacos·springcloud·服务注册发现·java后端·nacos3.x
Rain的Java大神之路1 小时前
MySQL 与 Redis 双写一致性:从 Cache-Aside 到 Binlog 兜底,一次讲透
java·后端·面试
程序员蜡笔熊1 小时前
HTML attribute 和 DOM property,根本不是一回事
java·前端·html
泡海椒1 小时前
Java 生成接口调用量趋势 PDF:jquick-pdf 多重折线图(JChartType.MultipleLine)落地
java·开发语言·pdf
syf0611132 小时前
Java 多线程编程:从原理到实战
java·开发语言