import java.util.*;
public class array3 {
public static void main(String[] args) {
int ar3[]={33,45,67,87,34,56};
int ar4[]={5,8,9,22,3,4};
List list1=new ArrayList();
List list2=new ArrayList();
for (int i = 0; i < ar3.length; i++) {
list1.add(ar3[i]);
}
for (int i = 0; i < ar4.length; i++) {
list2.add(ar4[i]);
}
list1.addAll(list2);
System.out.println(list);
}
}
Output
33, 45, 67, 87, 34, 56, 5, 8, 9, 22, 3, 4
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.