mardi 4 août 2015

Is there a faster way to input data into an arraylist than the previous methods?

Is there any way I can input data into any array list without actually doing the following every-time I want to insert data?

ArrayList<dataType> kwh = new ArrayList<dataType>();
arrayListVariable.add(data);
arrayListVariable.add(moreData);
arrayListVariable.add(evenMoreData);

As of right now, this seems to be very time consuming if I need to put in quite a bit of data into the array list. Is there a better or faster way of doing this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire