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

相关推荐
怜淇6 分钟前
docker拉取openjdk8:jre失败
java·docker·容器
降临-max22 分钟前
JavaWeb企业级开发---Mybatis
java·开发语言·笔记·学习·mybatis
好好研究1 小时前
SpringBoot注解的作用
java·spring boot·spring
Libby博仙1 小时前
Spring Boot 条件化注解深度解析
java·spring boot·后端
我是小疯子661 小时前
深入解析C++右值引用与移动语义
java·开发语言·算法
better_liang1 小时前
每日Java面试场景题知识点之-JUC锁的底层原理
java·并发编程·juc·锁机制·reentrantlock·readwritelock·底层原理
悟能不能悟1 小时前
Elastic Stack 中两种主要查询语言 KQL (Kibana Query Language) 和 Lucene 的详细对比和解释。
java·开发语言
我是一只小青蛙8881 小时前
Java连接MySQL数据库实战指南
java
夏末4722 小时前
Java异常处理终极指南:从入门到企业级实战,让程序稳如老狗!
java·java ee
子非鱼9212 小时前
SpringBoot快速上手
java·spring boot·后端