i have an array like this:
String[][] data= {"s", "w","s", "y", "r", "r", "y", "p"};
i wanna do some action if there was no similar array element before that particular element,
for example, do something if data[0]=="s", then do something if data[1] == "w", but skip when data[2]=="s", because "s" already exists before data[2], like this:
for(int i=0; i<data.length; i++){
if(data[i] != SIMILAR ELEMENT BEFORE data[i]){
DO SOME ACTION
}
}
can someone please tell me some idea? please...
thank u