I know that generic arrays are not supported by Java, but I don't know how to fix this so it will work -


i'm try create hashtable , part of code requires array, when it's not delcared generic unchecked warnings, know generic arrays aren't supported, i'm not sure how fix this.

array = new hashentry<anytype>[ nextprime( arraysize ) ]; 

i suggest checking out jdk's own code hashmap, resize method , these lines:

    @suppresswarnings({"rawtypes","unchecked"})         node<k,v>[] newtab = (node<k,v>[])new node[newcap]; 

newtab assigned main instance variable, table. so, if jdk can't avoid @suppresswarnings, neither you.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -