I have 2 String
Arrays
String[] question1 = {"Q1","Q2","Q3","Q4"}; String[] question2 = {"Q5","Q6","Q7","Q8"};
And one ArrayList
ArrayList<String> aList = new ArrayList<String>();
How can I manipulate them if i want to access to a member of ArrayList
. I tried converting both arrays to String but it doesn't give solution.
ArrayList allows duplicate values in its collection. On other hand duplicate elements are not allowed in Hashset.
ArrayList<String> aList = new ArrayList<String>(Arrays.asList(question1)); aList.addAll(Arrays.asList(question2));
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