I have an error in this code:
Source:
System.out.println("Load");
Path path = Paths.get("BillboardHot100.csv");
Path textpath = path;
user1.User_Playlist.load(textpath);
user1.User_Playlist.shuffle(40);
Stream.Users.add(user1);
Stream.userList();
Attempt:
public void load(Path textpath){
if (textpath != null){
try {
File playlistFile = new File(textpath);
Scanner fileScanner = new Scanner(playlistFile);
System.out.println("Processing playlist file " + playlistFile + ":");
I get an error on: File playlistFile = new File(textpath);
The error says: The constructor File(Path) is undefined
I need help fixing this error