Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have a code for my project in Java and one of the classes is as shown below but when I want to run this code I will get compile error in this class one part of code is:
package othell 问问题
问问题 2013-06-21T11:50:44.387 3840 次 This question shows research effort; it is useful and clear 5 This question does not show any research effort; it is unclear or not useful Bookmark this question. Show activity on this post. java 4 2 回答 2 This answer is useful 5 更改以下行 public JComboBox<Object> leftAICombo; public JComboBox<Object> rightAICombo; 至 public JComboBox leftAICombo; public JComboBox rightAICombo; 此处 JComboBox<Object>仅在 java7 中引入类型参数。如果您使用低于 7 的 jdk,则会出现错误 于 2013-06-21T11:52:30.903 回答 This answer is useful 4 Java 7中添加了泛型JComboBox。看来您使用的是早期版本的 JDK。升级到 Java 7 或删除泛型。建议使用前者,因为它提供更多功能/修复以及最新的。 于 2013-06-21T11:55:51.930 回答 Related 2 c++ - C++ 启动时协调进程? 3 python - 了解python类属性 2 c - Windows 7 7 上的 Tiny C 编译器 0 asp.net-mvc-4 - mvc 防伪令牌未呈现,即使我将其添加到表单中 3 doctrine-orm - Composer 无法使用 zfc-user-doctrine-orm 进行更新 2 r - 如何指定矩阵的最后一列 1 string - 如何处理 HTAccess 重定向中的问号 2 ios - 选择 UICollectionViewCell 时使用键和值创建 NSDictionary 1 c# - 检查 Web API 是否可用的好/正确方法是什么? 1 forms - 关于表单问题的导航栏 Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641
更改以下行
public JComboBox<Object> leftAICombo; public JComboBox<Object> rightAICombo;
至
public JComboBox leftAICombo; public JComboBox rightAICombo;
此处 JComboBox<Object>仅在 java7 中引入类型参数。如果您使用低于 7 的 jdk,则会出现错误
JComboBox<Object>
Java 7中添加了泛型JComboBox。看来您使用的是早期版本的 JDK。升级到 Java 7 或删除泛型。建议使用前者,因为它提供更多功能/修复以及最新的。
JComboBox