i have two ArrayList which are:
ArrayList<String> input = new ArrayList<String>();
ArrayList<String> output = new ArrayList<String>();
input contains these data:
input= {a b c d, a g f r, d e a b, k c s x, f g h s}
output contains:
output = {a b c f, g f x r, d e f g}
i would like to compare the value of those list such as: input(0) contains a,b,c and d while output(0) contains a,b,c and f.if we compare we can get a,b and c are the similar value means both arrays have 3 similar values.
Iteration<String> itr = input.iterator();
while(itr.hasNext()) {
//should i do this to get each value in each row?
for(String s : input) {
StringTokenizer b = new StringTokenizer(s," ");
String[] temp_input = new String[n];
int i = 0;
while(b.hasMoreTokens()) {
temp_input[i] = b.nextToken();
}
}
}
so the result should be the number of similar values btween input and output. thanks in advance..