ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();
postParameters.add(new BasicNameValuePair("a", "yes"));
postParameters.add(new BasicNameValuePair("b", "Value 2"));
postParameters.add(new BasicNameValuePair("c", "Value 3"));
How would I access the last NameValuePair’s value and input it into a String. I am currently trying:
String tester = postParameters.get(3).getValue();
but my application crashes.
How do I get tester to become “Value 3”?
Thanks,
ArrayList is zero indexed (ie first index is 0), so this should work better;