list array android
import java.util.ArrayList;
//Integer ArrayList
ArrayList<Integer> aList = new ArrayList<Integer>();
aList.add(5);
aList.add(11);
aList.add(17);
System.out.println("Integer Number Added in ArrayList= " + aList);
//String ArrayList
ArrayList<String> sList = new ArrayList<String>();
sList.add("Learning");
sList.add("JAVA");
System.out.println("String Added in ArrayList= "+ sList);
4.25
8
public void ensureCapacity (int minCapacity)
Thank you!
8
0
Are there any code examples left?
New code examples in category Java