I want to check if filename and password file correct continue code.. else get an error for check password file.
my code is:
Scanner scanInputUser = new Scanner(System.in);
System.out.println("Please Enter UserName:");
String fileName = scanInputUser.nextLine();
fileHandler.setUserName(fileName); // This file name has already been defined in another class.
//and using this method with instance class..
try {
System.out.println("Please Enter Password:");
String passSaver = scanInputUser.nextLine();
cryptography.setKeyUser(passSaver); // password decrypt save to same file.
//This method has already been defined in another class.
fileHandler.passwordSaver(passSaver);
} catch (Exception e) {
e.printStackTrace();
}
//TODO check correct password for file name
(note: password file name saved to the same file).