This error message is telling you that you are trying to use the diamond operator in a version of Java that does not support it. The diamond operator is a shorthand way of specifying generic types in Java, introduced in Java 7.

To fix this error, you need to either upgrade your Java version to 7 or higher, or remove the diamond operator from your code and explicitly specify the generic types. For example, instead of using:

List myStrings = new ArrayList<>();

You would use:

List myStrings = new ArrayList()

java diamond operator is not supported in -source 15 use -source 7 or higher to enable diamond operator

原文地址: http://www.cveoy.top/t/topic/doII 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录