How I can access array elements of List
问题 I have a question: I have a List Java that I have populated with different values. For example, I have: List<String[]> l = new ArrayList(); String[] lis = new String[3]; lis[0] = "A"; lis[1] = "B"; lis[2] = "C"; l.add(lis); and I have other values too. Now, I want to get the search in this list only the first field. For example, I want the A's indexOf. I have tried to write this code: int index = l.indexOf("A"); but I get -1 as return. I would like to know how I can access to a field of the