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

相关推荐
苹果醋3几秒前
Java设计模式实战:从面向对象原则到架构设计的最佳实践
java·运维·spring boot·mysql·nginx
郑州光合科技余经理10 分钟前
实战分享:如何构建东南亚高并发跑腿配送系统
java·开发语言·javascript·spring cloud·uni-app·c#·php
yaoxin52112314 分钟前
273. Java Stream API - Stream 中的中间操作:Mapping 操作详解
java·开发语言·python
一念一花一世界18 分钟前
Arbess从基础到实践(25) - 集成GitLab+阿里云OSS实现Java项目自动化构建并将制品上传Aliyun OSS
java·阿里云·gitlab·cicd·arbess
liyi_hz200820 分钟前
企业信创落地深水区:O2OA(翱途)平台的国产化适配实践与技术思考
java·开源软件
她说..23 分钟前
手机验证码功能实现(附带源码)
java·开发语言·spring boot·spring·java-ee·springboot
Adellle25 分钟前
Java-Stream流
java
xUxIAOrUIII34 分钟前
JWT和拦截器使用【附Maven中操作步骤】
java·maven
带刺的坐椅35 分钟前
Liquor(Java 脚本)替代 Groovy 作脚本引擎的可行性分析
java·groovy·liquor
武子康41 分钟前
Java-203 RabbitMQ 生产者/消费者工作流程拆解:Connection/Channel、默认交换器、ACK
java·分布式·消息队列·rabbitmq·erlang·ruby·java-rabbitmq