My Account class have 3 variable to store name, id and password
and my method addAcount() get 3 parameter and pass all into the 3 variable.
The problem is i cant pass the 3 parameter item into the 3 variable.
my 3 variable declaration :
private String[] id = new String[100];
private String[] pass = new String[100];
private String[] name = new String[100];
here's my method:
public void addAccount(String id, String pass, String name){
for(int i=0; i < this.id.length;i++){
if(this.id[i]==null){
this.id[i]=id;
for(int a = 0; a <this.pass.length;a++){
if(this.pass[a]==null){
this.pass[a]=pass;
for(int b=0;b<this.name.length;b++){
if(this.name[b]==null){
this.name[b]=name;
break;
}
}
}
}
}
}
Any Help will be Appreciated