@SuppressWarnings("unchecked") goes just before public void doLinkedListExample(), not when it is used.

Another way to avoid the warnings (without suppressing them) would be to declare the lists as List<Object> (to allow the addition of Integers and Strings to the same list), but then you would get an error with Collection.sort. If, instead of <Object> you use <String> (you'll also need to convert the integers to String) you'll have no problems with sort.