Ask questions and see you at May, 2nd, 8.PM. CET: youtube.com/c/bienadam
Also checkout recent episode:
Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks
Hi Adam, how can i optimize nested ArrayList of Objects?
I have 3 Classes
From every Class i create an ArrayList
Every ArrayList has 200.000 Elements
I want know which Substances takes a people?
therefore i need iterate over all 3 ArrayLists
Code-Example:
Substance detectSubstance(People people) {
// Must iterate over 200.000
for (Drug drug : drugList){
if (people.getDrugID == drug.getDrugId) {
// Must again iterate over 200.000
for (Substance substance : substanceList){
if (drug.getSubstanceID = substance.getSubstanceId) {
....
How can i optimize it?