import java.util.Collections; import java.util.LinkedList; public class Main { public static void main(String[] argv) throws Exception { LinkedList stack = new LinkedList(); Object object = ""; stack.addFirst(object); Object o = stack.getFirst(); stack = (LinkedList) Collections.synchronizedList(stack); } }