How do I solve this error converting an array into a set?
String line = scan.nextLine();
char[] arr = line.toCharArray();
System.out.println(Arrays.toString(arr));
HashSet<Character> repeat = new HashSet<Character>(Arrays.asList(arr));
System.out.println(repeat);
The error is:
error: no suitable constructor found for HashSet(List<char[]>)