Java – type set is not universal; It cannot be parameterized

My eclipse faces this strange problem

Type set is not universal; It cannot be parameterized with the parameter < integer >

I cleaned up and built my project again Check my configuration build path and ensure that jresystemlibrary is higher than Maven dependencies. In order and export

Google search, but I found no problem with my code Why did the error pop up

Solution

When you call set, it will be treated as your class set, not Java util. Set.

Change the declaration to Java util. Set, which should be resolved

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>