ArrayList need suggestions/opinion
Posted: Wed Feb 18, 2015 12:12 am
Hello,
I hate when need write:
what you think about this method to add all ArrayList? Or you have any other suggestions?
I'm smart badass

Thanks,
Bencratus
I hate when need write:
Code: Select all
buffs.add(1045);
buffs.add(1048);
buffs.add(1040);
I'm smart badass





Code: Select all
int x[] = {1045,1048,1040};
for (int a = 0; a < 3; a++)
{
buffs.add(x[a]);
}
Better way and it works, thanks to malyelfik and thanks to java 8malyelfik wrote:Try Arrays.asList()
Documentation: http://docs.oracle.com/javase/8/docs/ap ... l#asList-T...-

Thanks,
Bencratus