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 1 php - Drupal 预览/编辑损坏?CCK的任何自动保存? 1 ios - 如何使用相机将图片添加到表单? 3 c++ - 使用向量读取输入文件 2 ssas - 在 SSAS 中创建父子引用时出现问题 2 php - PHP 调用返回 XML/JSON 的 url 1 ruby-on-rails - Lynda Rails 培训中的 ActiveRecord::RecordNotFound 错误(第 9 章 - 删除/销毁) 1 jquery - 在引导 2.0 的页面加载时更改正文标记 2 .net - 哪些编程习惯会影响窗口句柄的数量? 0 c - OpenSSL:EVP_DecryptFinal_ex 中发生错误 2 c - 如何使用 Opencv SparseMatrix 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