For this Question: Given an unsorted array arr[] of N integers and a sum. The task is to count the number of subarrays which adds to a given number.The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. 
Each test case contains an integer N denoting the size of the array and integer denoting the value of the sum in the first line. 
The next line contains N space separated integers forming the array.

Constraints:
1 <= T <= 100
1 <= N <= 10^4
-105 <= arr[i] <= 10^5
-105 <= sum <= 10^5

Note:- Sum of N over all test cases does not exceed 10^5For each testcase, in a new line, print the count of the subarrays which add to the given sum.Sample Input
2
5 -10
10 2 -2 -20 10
6 33
1 4 20 3 10 5

Sample Output
3
1

Explanation:
Testcase 1: Subarrays with sum -10 are: [10, 2, -2, -20], [2, -2, -20, 10] and [-20, 10].
Testcase 2: Subarray with sum 33 is: [20, 3, 10]., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {

	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int T=Integer.parseInt(br.readLine());
	for(int k=0;k<T;k++)
	{
	String s[]=br.readLine().split("\\s");
	int N=Integer.parseInt(s[0]);
	int sum=Integer.parseInt(s[1]);
	s=br.readLine().split("\\s");
	int arr[]=new int[N];
	for(int i=0;i<N;i++)
	{
		arr[i]=Integer.parseInt(s[i]);
	}
	long count=0;
	long sum1=0;
	for(int i=0;i<N;i++)
	{
		for(int j=i;j<N;j++)
		{
			sum1+=arr[j];
			if(sum1==sum)
			{
				count++;
			}
		}
		sum1=0;
	}

System.out.println(count);
	}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?