This Java tip illustrates a method of implementing a Stack. Developer may use stack
for storing elements in a memory. Stack uses First in Last out (FILO). Developer may
need to use push and pop to insert and retrieve data elements from the stack.

LinkedList stack = new LinkedList();// Push on top of stackstack.addFirst(object);// Pop off top of stackObject o = stack.getFirst();// In case multiple threads are using a stack // there is a need to synchronize methodsstack = (LinkedList)Collections.synchronizedList(stack);