public static List<Socket> socketList = new Collections.synchronizedList(new ArrayList<>());
In the code, Collections.synchronizedList, prompt me Cannot resolve symbol synchronizedList, I don't know what it is. I didn't find this method for Collections in the JDK documentation either (just because I probably couldn't find it, doesn't mean he didn't).
Maybe it's a problem with my IDEA setup, but I can't find it.
because
synchronizedListis not a class fromCollections- it is a method.Remove the
newkeyword from that statement:The
newkeyword is used to create a new instance of a class and requires a class, but the compiler is not able to find that class => symbol not found