Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmb385demo/d580f0c47b359eba9b41b6e35293d2ce to your computer and use it in GitHub Desktop.
Save kmb385demo/d580f0c47b359eba9b41b6e35293d2ce to your computer and use it in GitHub Desktop.
String Order
List<String> values = new ArrayList<>(List.of("z", "a", "b"));
System.out.println(values); //output [z, a, b]
Collections.sort(values);
System.out.println(values); //output [a, b, z]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment