How to solve "error: cannot find symbol Comparator"?

I want to sort the array of arrays of characters in lexicographical order.

Arrays.sort(strs, new Comparator<character[]>() {
 public int compare(char[] s1, char[] s2) {
 return (new String(s1)).compareTo(new String(s2));
}
});</character[]>

Where is char strs[][];

Here is what the compiler:
.\XXXY\XXX.java:YY: error: cannot find symbol
 Arrays.sort(strs, new Comparator<character[]>() {
^
 symbol: class Comparator
 location: class XXX
1 error<character[]>
June 10th 19 at 16:26
1 answer
June 10th 19 at 16:28
Solution
Add to the beginning of the source code import java.util.Comparator;

Find more questions by tags Java