indexOf in a string array

前端 未结 6 912
太阳男子
太阳男子 2020-12-09 09:59

Is there anyway to get indexOf like you would get in a string.

output.add(\"1 2 3 4 5 6 7 8 9 10);  
String bigger[] = output.get(i).split(\" \");
int bigge         


        
6条回答
  •  既然无缘
    2020-12-09 10:38

    Use this ...

    output.add("1 2 3 4 5 6 7 8 9 10");  
    String bigger[] = output.get(i).split(" ");
    int biggerWher = Arrays.asList(bigger).indexOf("3");
    

提交回复
热议问题