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

相关推荐
张北北.18 分钟前
【深入底层】C++开发简历4+4技能描述6
java·开发语言·c++
Java初学者小白21 分钟前
秋招Day19 - 分布式 - 分布式事务
java·分布式
rannn_1111 小时前
Java学习|黑马笔记|Day23】网络编程、反射、动态代理
java·笔记·后端·学习
火车叨位去19491 小时前
用Java实现rpc的逻辑和流程图和核心技术与难点分析
java·rpc·流程图
阿华的代码王国1 小时前
【Android】相对布局应用-登录界面
android·xml·java
计算机编程果茶熊2 小时前
毕设选题难、不会写代码、答辩紧张?校园失物招领系统从需求到实现全流程指南|计算机毕业设计
java·vue.js
tellmewhoisi2 小时前
java8 List常用基本操作(去重,排序,转换等)
java·list
都叫我大帅哥2 小时前
TOGAF应用架构阶段全解析:从理论到Java代码实战
java
Amagi.3 小时前
Java设计模式-建造者模式
java·设计模式·建造者模式
EmpressBoost3 小时前
谷粒商城170缓存序列化报错
java·spring·缓存