java - where to use ArrayList and where to use simple array specially for integer -
can please explain in situation supposed use arraylist instead of simple array , diffrence between these 2 , how intialise arraylist.i new java use example if possible
whenever don't know size created, can use arraylist..
if want speed access, can use array. (indexing in array faster arraylist)..
and , arraylist reduces complexity of coding...
arraylist can initialized creating object arraylist class
arraylist al = new arraylist();
al.add("string"); || al.add(number); can used add values arraylist..
Comments
Post a Comment