java - Compilation error, list not recognised -
i using trove collections, , more specifically, primitive arraylist ints.
the declaration of list follows:
tintarraylist list= new tintarraylist(); however, facing compilation error cannot explain. when declare list follows:
import gnu.trove.list.array.tintarraylist; public class main { tintarraylist list= new tintarraylist(); } , code runs correctly expected. however, when declare list (with different import statement) follows:
import gnu.trove.*; public class main { tintarraylist list= new tintarraylist(); } , compilation error appears not recognising tintarraylist.
i wondering why error appears? thought using * list should recognized. error doesn't appear when java.util.*; used instead of java.util.arraylist;.
the difference * not import sub-levels, in current level. if used import gnu.trove.list.array.*, work expect.
the reason works on java.util.* because arraylist class in same folder wildcard.
Comments
Post a Comment