arrays - Java SQL looping though List of Strings[] -
so have list of strings being returned db query: list<string[]> = getsqlreults(); the way results being return in name value pair: e.g name value test 0 test2 2 and on. now need loop though list , if name = "test ", store value in variable. any great! you can try like list<string[]> data = getsqlreults(); string result = null; (string[] str : data) { if ("test".equals(str[0])) { result = str[1]; break; } }