Quote (Calamitymic @ Jul 31 2012 05:38pm)
Here's the new code, it still seems to just print "User does not exist" repeatedly for the amount of elements in the array.
Is there restrictions with the type of data?
b/c the names[i] array is populated from an arraylist using .toarray method and the .showInputDialog is assigned to a string.
Code
boolean leave=false;
for(i=0; i<names.length;i++){
if(leave==false){
if((usTemp==names[i] && pwTemp==passwords[i])){
System.out.println("Welcome!");
leave=true;
}else{
System.out.println("User does not exist");
}
}
}
haha I should read more thoroughly... I gave the way wrong answer.
what is the namesArr's type?