I have two arraylists A1, A2. Each element of A1 would be the key and each element of A2 the corresponding value. So the solution that I found is looping on A1 ( A1 and A2 have the same size) making hashmap.add(A1[i],A2[i]) but is there a way to directly send the key value pairs as two sets? I want to avoid loops it is going to slow my code..Thank you in advance!
"I want to avoid loops it is going to slow my code." Anytime code does anything, it slows down your code. The key is to avoid doing things you don't need to do. Something needs to iterate through your lists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With