FaltuTech.Club : Fane of Advanced Logical Thriving Utopian Technical Club

Merge Two Arrays in Third Array in Java

Merge Two Arrays in Third Array in Java



class MergeArray{
    public static void main(String args[]){
        int arr[] = {4,5,6,7,8};
        int arr2[] = {9,10,11,12};
        
        int merge[] = new int[(arr.length)+(arr2.length)];
    
        for(int i=0; i

output


4
5
6
7
8
9
10
11
12


Compiled with JDK 9