@@ -0,0 +1,1055 @@
+package week8;%0A%0Aimport java.nio.file.Files;%0Aimport java.nio.file.InvalidPathException;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.util.Scanner;%0A%0Apublic class VideoWhilePathCheck %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%0A%09%09Scanner scanner = new Scanner(System.in);%0A%09%09Path userPath = null;%0A%09%09boolean isValid = false;%0A%09%09%0A%09%09while(isValid == false) %7B%0A%09%09%09try %7B%0A%09%09%0A%09%09%09%09System.out.println(%22Please enter a filepath: %22);%0A%09%09%09%09%0A%09%09%09%09String filePath = scanner.nextLine();%0A%09%09%09%09%0A%09%09%09%09userPath = Paths.get(filePath);%0A%09%09%09%09%0A%09%09%09%09if(filePath.trim() == %22%22) %7B%0A%09%09%09%09%09System.out.println(%22Sorry, that file path was empty!%22);%0A%09%09%09%09%09continue;%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09if(Files.exists(userPath)) %7B%0A%09%09%09%09%09isValid = true;%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09System.out.println(%22Sorry, that file did not exist%22);%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09System.out.println();%0A%09%09%09%09%0A%09%09%09%7D catch (InvalidPathException ex) %7B%0A%09%09%09%09System.out.println(%22Path was not valid%22);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09%0A%09%09// we have valid input.%0A%09%09%0A%09%09System.out.println(%22user's path: %22 + userPath.toAbsolutePath());%0A%09%09System.out.println(%22Done!%22);%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create VideoWhilePathCheck.java