I am not talking about android development,i want to know if i could know if a java program is run for the first time.My program is supposed to get a user input for a password and check if the password matches the stored encrypted password and then fill some arrays and variables.But if it is the first time running the program then the user is supposed to create a password and then create the .txt and write the data.Apart from creating the .txt first is there a way to do this?
public class MyClass {
AccountReader reader = new AccountReader();
AccountWriter writer = new AccountWriter();
public static void main(String args[]) {
if(its the first time launching) do something
else{
reader.readFromFile();
do something else
}
.
.
.
writer.writeToFile();
}
}