You may use java.util.Stack if you are looking for LIFO list. Review the code below:

Java Code:
Stack stack = new Stack();
stack.push("Obj1");
stack.push("Obj2");
stack.push("Obj3");
stack.push("Obj4");

System.out.println("Size: " + stack.size());

System.out.println("Stack header is: " + stack.peek());
System.out.println("Popped value is: " + stack.pop());
System.out.println("Stack header is: " + stack.peek());