SyntaxFix
Write A Post
Hire A Developer
Questions
LinkedList<String>list = new LinkedList<String>(); list.add("abc"); list.add("Bcd"); list.add("aAb"); list.sort(String::compareToIgnoreCase);
Another option would be using lambda expressions:
list.sort((o1, o2) -> o1.compareToIgnoreCase(o2));