类型集不是通用的;它不能用参数< Integer>参数化 [英] The type Set is not generic; it cannot be parameterized with arguments <Integer>

查看:136
本文介绍了类型集不是通用的;它不能用参数< Integer>参数化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在面对Eclipse的这个奇怪的问题。
获取此错误



类型Set不是通用的;不能使用参数< Integer>



参数化我清理并再次构建我的项目。
检查我的配置构建路径,并确保 JRESystemLibrary 订单和导出中的MavenDependencies



Google搜索也不错,但我的代码找不到任何问题。
为什么错误弹出。



解决方案

当您调用 Set 被取为您的课程设置,而不是 java.util.Set



更改声明为 java.util.Set ,应该解决。


I am facing this weird problem with my Eclipse. Getting this error

The type Set is not generic; it cannot be parameterized with arguments <Integer>

I cleaned and build my project again. Checked my Configure Build path and ensured that JRESystemLibrary is above MavenDependencies in Order and Export.

Googled as well but I can't find any issue with my code. Why is the error popping up.

解决方案

When you call Set it is being taken as your class Set, not java.util.Set.

Change the declaration to java.util.Set and it should be resolved.

这篇关于类型集不是通用的;它不能用参数&lt; Integer&gt;参数化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆