I want to have an array of strings and two methods,one gets some (10 for example)strings and save them in order and the second method gets one of those strings and returns the array index where it is saved.But my code just save the the first string.Can you help?
public void savingselectedcourses(String coursenum){
for( n=0;n<=9;n++){
sc=selectedcourses[n];
if(sc==null)
selectedcourses[n]=coursenum;
chta.setText(sc);
}
}
public int removingcourses(String coursenum){
for( m=0;m<=9;m++){
if(selectedcourses[m]==coursenum)
break;
}
return m;
}
Thanks for you responses.