For this Question: Given an array of N integers, your task is to print all subarrays of the given array in the order given as:-
First, print all the subarrays starting from the first element of the array in increasing order of their size. Then go for the second element and print all of its subarrays in increasing order and so on.<b>User task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the functions <b>PrintSubarrays</b> that takes the integer N and the array Arr as parameters.

Constraints:-
1 <= N <= 100
1 <= Arr[i] <= 100000Print all the subarray in a new line in the order mentioned above.Sample input:-
3
1 2 3

Sample Output:-
1
1 2 
1 2 3
2
2 3
3

Sample Input:-
2
2 4

Sample Output:-
2
2 4
4, I have written this Solution Code: static void PrintSubarrays(int Arr[], int N){
solve(Arr,N,0,0);
}

static void solve(int a[],int n, int cnt, int e){

if(e==n){cnt++;e=cnt;}

if(cnt==n){return;}

for(int i=cnt;i<=e;i++){
    System.out.print(a[i]+" ");
}
System.out.println();
solve(a,n,cnt,e+1);


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