I am beginner at java and I want to check if the string path that the user provide for the file is valid or not, e.g if the path exists, if contains is not null and the file is not empty and etc. How can I do that?
private static final String FILE_PATH = "com.var.file.path";
String file_path = System.getProperty(FILE_PATH, DEFAULT_FILE_PATH);