good I want to add 4 data if it is in the array a b c d but if you add once and do not add again look at a = 36 data, b = 28, c = 7, d = 3; they are the people who have an amount; if I join in an interacion and the code repeats I should not add in another interacion the iterations would be the following ones
add a data:
a + b + c + d
a + b + c
a + c + d
b + c + d
d + a + b
a + b
a + c
a + d
b + c
b + d
c + d
suppose I have 5 employees
employee 1 would have to leave = 27
employee 2 = 4
employed 3 = 21
Employee 4 = 2
Employee 5 = 1
but I get it like this:
Employee 1 = 27
empleado1 = 21
Employee 1 = 15
Employee 1 = 11
and so I want to ignore if I already add
for (int i = 0; i < list0706a.size(); i++) {
double suma = 0;
for (int j = 0; j < list0706b.size(); j++) {
if (list0706b.get(j).getCODIGO() == list0706a.get(i).getCODIGO()) {
for (int a = 0; a < list0706c.size(); a++) {
if (list0706c.get(a).getCODIGO() == list0706b.get(j).getCODIGO()) {
for (int d = 0; d < list0706d.size(); d++) {
if (list0706d.get(d).getCODIGO() == list0706c.get(a).getCODIGO()) {
//Encontre = 1234;
suma = (listh0706a.get(i).getRESULTADO()
+ listh0706b.get(j).getRESULTADO()
+ listh0706c.get(a).getRESULTADO()
+ listh0706d.get(d).getRESULTADO());
pw.println(String.valueOf("0" + list0706d.get(i).getCODIGO_DOC()
+ "|" + list0706d.get(i).getCEDULA() + "|"
+ "0706" + "|"
+ df.format(suma) + "|"
+ df.format(suma) + "|"));
}
}
}
}
}
}
}
So I did the for but when I continue it adds the previous ones