For this Question: Given two sorted array your task is to merge these two arrays into a single array such that the merged array is also sortedFirst line contain two integers N and M the size of arrays 
Second line contains N separated integers the elements of first array
Third line contains M separated integers elements of second array

<b>Constraints:-</b>
1<=N,M<=10<sup>4</sup>
1<=arr1[], arr2[] <=10<sup>5</sup>Output the merged arraySample Input:-
3 4 
1 4 7
1 3 3 9

Sample Output:-
1 1 3 3 4 7 9
, I have written this Solution Code: 
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
	    
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n];
		int b[] = new int[m];
for(int i=0;i<n;i++){
a[i]=sc.nextInt();
}
for(int i=0;i<m;i++){
    b[i]=sc.nextInt();

}
int  c[]=new int[n+m];
int i=0,j=0,k=0;

while(i!=n && j!=m){
    if(a[i]<b[j]){c[k]=a[i];k++;i++;}
    else{c[k]=b[j];j++;k++;}
}
while(i!=n){
    c[k]=a[i];
    k++;i++;
}

while(j!=m){
    c[k]=b[j];
    k++;j++;
}

for(i=0;i<n+m;i++){
    System.out.print(c[i]+" ");

		
		}


}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?