I am trying to implement voice recognition code in Android. How do I get an element at a particular position from array list in Android? I tried converting arraylist
In arraylist you have a positional order and not a nominal order, so you need to know in advance the element position you need to select or you must loop between elements until you find the element that you need to use. To do this you can use an iterator and an if, for example:
Iterator iter = list.iterator();
while (iter.hasNext())
{
// if here
System.out.println("string " + iter.next());
}