When I reverse iterate over an ArrayList I am getting a IndexOutOfBoundsException. I tried doing forward iteration and there is no problem. I expect and know that there are five
You can do this if you are comfortable with foreach loop.
List list = new ArrayList();
list.add("ABC");
list.add("DEF");
list.add("GHI");
ListIterator listIterator = list.listIterator(list.size());
while(listIterator.hasPrevious()){
System.out.println(listIterator.previous());
}