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 4 java - 在Java中找到满足的条件子句 1 google-maps - Webshaper中的谷歌地图热图? 5 javascript - 解析 JSON 错误:Javascript 1 java - java.lang.NullPointerException 选择操作栏项目 2 asp.net-web-api - 异步 WebApi ActionFilterAttribute。异步模块或处理程序已完成,而异步操作仍处于挂起状态 2 php - 从mysql获取最后的记录 1 javascript - Javascript - fillRect 和 drawImage 之后的 getImageData 2 c++ - 如何在 QWidget 子类之外调用 QMessageBox 静态 API 5 c# - 列出哪些索引可以双向扩展? 2 wcf - wcf 返回类时出错 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