The error about List suggests you might have your own List class.
Major error: why are all those methods
static? That is non‑object‑oriented programming.
You should have a class which has the List of names as a field, and it can sort its List, display contents, etc.