class Demo
{
public static void main(String[] args)
{
ArrayList al = new ArrayList();
al.add("rwyh");
al.add("dbjh");
al.add("dsej");
al.add("vkdq");
System.out.println(al);
ListIterator it = al.listIterator(al.size());
while (it.hasPrevious())
{
System.out.println(it.previous());
}