I want to merge down 3 arraylist in one in java. Does anyone know which is the best way to do such a thing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
ArrayList.addAll(). Something like this should work (assuming lists containStringobjects; you should change accordingly).Update
I can see by your comments that you may actually be trying to create a 2D list. If so, code such as the following should work: