While i am trying to get value from arraylist,i got the following errors.My sample code is below.test is the name of my array list
String s = test.get(1);
04-05 11:51:42.525: E/AndroidRuntime(901): java.lang.IndexOutOfBoundsException: Invalid location 1, size is 1
04-05 11:51:42.525: E/AndroidRuntime(901): at java.util.ArrayList.get(ArrayList.java:341)
)
04-05 11:51:42.525: E/AndroidRuntime(901): at android.app.Activity.onMenuItemSelected(Activity.java:2170)
Invalid location 1, size is 1means that the ArrayList starts with index[0]. If you useget(1)you will receive the second entry.