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

相关推荐
老华带你飞14 小时前
房屋租赁|房屋出租|房屋租赁系统|基于Springboot的房屋租赁系统设计与实现(源码+数据库+文档)
java·数据库·spring boot·vue·论文·毕设·房屋租赁系统
TDengine (老段)14 小时前
TDengine 数学函数 ASCII 用户手册
java·大数据·数据库·物联网·时序数据库·tdengine·涛思数据
1234616114 小时前
互联网大厂Java面试:从Spring Boot到微服务的探索
java·数据库·spring boot·微服务·面试·mybatis·orm
光仔December14 小时前
【Elasticsearch入门到落地】18、Elasticsearch实战:Java API详解高亮、排序与分页
java·elasticsearch·es排序·es分页·es高亮
码上零乱14 小时前
跟着小码学算法Day19:路径总和
java·数据结构·算法
ai旅人14 小时前
深入理解OkHttp超时机制:连接、读写、调用超时全面解析
java·网络·okhttp
NON-JUDGMENTAL14 小时前
Tomcat 配置问题速查表
java·tomcat
一 乐14 小时前
农产品销售系统|农产品电商|基于SprinBoot+vue的农产品销售系统(源码+数据库+文档)
java·javascript·数据库·vue.js·spring boot·后端·农产品销售系统
蒲公英源码14 小时前
java企业OA自动化办公源码
java·spring boot·后端
鬼火儿15 小时前
集成RabbitMQ+MQ常用操作
java·后端