Max circular sum array

import java.util.*;
public class Main
{
static int maxCircularSum (int a[])
{
int n = a.length;

    // Case 1: get the maximum sum using standard kadane' 
    // s algorithm 
    int max_kadane = kadane(a); 

    // Case 2: Now find the maximum sum that includes 
    // corner elements. 
    int max_wrap  =  0; 
    for (int i = 0; i < n; i++) 
	{ 
        max_wrap += a[i]; // Calculate array-sum 
        a[i] = -a[i];  // invert the array (change sign) 
    } 

    // max sum with corner elements will be: 
    // array-sum - (-max subarray sum of inverted array) 
    max_wrap = max_wrap + kadane(a); 

    // The maximum circular sum will be maximum of two sums 
    return (max_wrap > max_kadane)? max_wrap: max_kadane; 
} 

//  to find maximum subarray sum 

static int kadane (int a[]) 
{ 
    int n = a.length; 
    int max_so_far = 0, max_ending_here = 0; 
    for (int i = 0; i < n; i++) 
    { 
        max_ending_here = max_ending_here + a[i]; 
        if (max_ending_here < 0) 
            max_ending_here = 0; 
        if (max_so_far < max_ending_here) 
            max_so_far = max_ending_here; 
    } 
    return max_so_far; 
	
} 

public static void main (String[] args) 
{ 
	Scanner sc=new Scanner(System.in);
	int testcases=sc.nextInt();
	while(testcases>0){
		int n=sc.nextInt();
		int[] a=new int[n];
		for(int i=0;i<n;i++){
			a[i]=sc.nextInt();
		}
		int p;
		p = maxCircularSum(a);
        System.out.println("Maximum circular sum is " + 
                        maxCircularSum(p)); 
						testcases--;
} 
}

}

went error at maxCircularSum(p);

hey @karthik1989photos
just a change
System.out.println( p );
instead of System.out.println("Maximum circular sum is " + maxCircularSum( p));

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.