How to sort without considering special characters in java?
问题 I wanted to sort a list of names and I used compareTo method and I have names like this on my list $urya, andy, prince, @rikesh, expected output: andy, prince, $urya, @rikesh, instead, I get: $urya @rikesh andy prince What happens now is the name that starts with special characters come's first and then other names are sorted Is there a way to push the names that starts with special characters to last. if (this.firstName == name.firstName) { return 0; } else if (this.firstName == null) {