My professor gave me the java.util.Arrays.sort static method and it shows an error that the import cannot be resolved. This does not happen to any of my other methods. Is this written right?
Importing in Java involves either importing a member class of a package, in this case (java.util is the package, Arrays is the class)
or importing the entire package, which would be
There is no concept of importing an individual class method, which is what
was attempting to do , because sort is just one method of the java.util.Arrays class (there are many other methods of that class).
So if you attempt to do that, you will get the error message you did.