Hi again, allow me to ask List question by giving one example and please comment:
1. I run a program with first input a = 1; and its result is stored in a list 'ifs'
which giving ifs.size() = 4
2. Then it repeats (loop) with second input a = 6; and wanted to store its result in same variable 'ifs'. their size is same. is it possible to do so?
Currently, by running second input it's giving me result ifs.size()=8
(total size for both inputs).
My aim is not to increase the 'ifs' size...it's like to create them in sublist such this:
ifs[i].size = 4
ifs[ii].size = 4
ifs[iii].size = 4
...
Please advise
1. I run a program with first input a = 1; and its result is stored in a list 'ifs'
which giving ifs.size() = 4
2. Then it repeats (loop) with second input a = 6; and wanted to store its result in same variable 'ifs'. their size is same. is it possible to do so?
Currently, by running second input it's giving me result ifs.size()=8
(total size for both inputs).
My aim is not to increase the 'ifs' size...it's like to create them in sublist such this:
ifs[i].size = 4
ifs[ii].size = 4
ifs[iii].size = 4
...
Code:
java.util.List ifs = new java.util.ArrayList();
Comment