I am trying to create a new Path using the following method:
Path path = new Paths.get(path_name);
I’ve imported both Path and Paths and I have confirmed that the method get exists in Paths, but Eclipse is telling me that the method does not exist. It says: Paths.get cannot be resolved to a type
What should I do? I restarted Eclipse and my PC but still no luck.
Thanks in advance.
Your code snippet is incorrect: invoking a static method does not require
new