My code executes properly only when it is not placed within the If statement. Why is that happening? I think there has to be something wrong with the condition which is supposed to check if Strings which are coming from JTextFields aren't empty. Here is my code which is working without using the If statement:
user1.name = name1;
user1.password = pass1;
user1.ip = i1;
save(user1);
And here is the badly implemented if statement:
if(!name1.equals("") && !pass1.equals("") && !i1.equals("")) {
user1.name = name1;
user1.password = pass1;
user1.ip = i1;
save(user1);
}
Aucun commentaire:
Enregistrer un commentaire