public static void main(String args[]){
		ArrayList<String> lines=new ArrayList();
		lines.add("First line");
		lines.add("Second line");
		lines.add("Third line");
		
		Iterator iter=(Iterator) lines.iterator();
		
		while(iter.hasNext()){
			System.out.println(iter.next());
		}
		
		Collections.reverse(lines);
		
		iter=(Iterator) lines.iterator();
		
		while(iter.hasNext()){
			System.out.println(iter.next());
		}
		//reverse(lines);
		
	}