This Solution is work for +ve numbers but not for -ve becouse if we sum = 0 is function in first call it already zero so it return true ever time. Please help

public static boolean findSum(int[] arr,int sum)
{

 	if (arr.length == 0) {
 		return false;
 	}
 	if (sum == 4)
 	{
 		return true;
 	}
 	int currNum = arr[0];
 	int[] subArray = Arrays.copyOfRange(arr, 1, arr.length);

// System.out.println(currNum);
boolean ch1 = findSum(subArray,sum+currNum);
boolean ch2 = findSum(subArray,sum);
return ch1||ch2;
}

@priyanshshukla.ps Bro what you can do is take a boolean flag in the function itself say isFirst which accounts if single element is included which you will pass as true when you call the function from main, now when recursive call is made then make it false if you are including element else pass it as true. So you can incorporate that flag in your if statement like this:-

if(!flag && sum == 0) {
return true
}

IF you have any doubt lemme know, else resolve it