不支持菱形运算符 [英] diamond operator is not supported
问题描述
我正在尝试使用菱形运算符,但收到以下消息:
I am trying to use the diamond operator, but I am getting the following message:
-source 1.5 不支持菱形运算符(使用 -source 7 或更高版本启用菱形运算符)
diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator)
它是否可以在带有 android 的 netbeans 中修复?
Is it fixable in netbeans with android?
推荐答案
Android 需要 Java 源代码合规性 5.0 或 6.0 (Java5/6).不支持开箱即用的 Java7.描述如何使用某些 java7 功能的 hack 的文章:http:///www.informit.com/articles/article.aspx?p=1966024.
Android needs java source compliance 5.0 or 6.0 (Java5/6). Java7 is not supported out of the box. The're articles describing hacks on how to use some of java7 features: http://www.informit.com/articles/article.aspx?p=1966024.
另请参阅 Android 的 Java 7 语言功能,Android 是否计划支持 Java7?,Android SDK 是否可以与 JDK 1.7 配合使用?.
这篇关于不支持菱形运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!