Answers for "android java array push"

0

android java array push

Use an ArrayList paramaterized to any type you want

ArrayList<Integer> iconList = new ArrayList<Integer>();

add with

iconList.add(Integer.parseInt(cursor.getString(0)));

Iterate with

for (int i: iconList)
{
    // i is your entire array starting at index 0
}
or

for (int i=0; i< iconList.size(), i++)
{

}
Posted by: Guest on April-17-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language