problem code-CHEFSUM(compilation error is arising)

class sum
{

    int prefix(int b[],int x)
    {
    int ps1=0;
    for(int l=0;l<x;l++)
    {
    ps1=ps1+b[l];
    }
    return ps1;
    }
     
    int suffix(int c[],int y)
    {
    int ss1=0;
    for(int h=n-1;h>=n-1-y;h--)
    {
    ss1=ss1+c[h];
    }
    return ss1;
    }
     
    public static void main(String args[])
    {
    int t,n,min=0,g=1;
    int a[]=new int[];
    Scanner sc=new Scanner(System.in);
    t=sc.nextInt();
    for(int i=0;i<t;i++)
    {
    n=sc.nextInt();
    min=0;
    g=1;
    for(int k=0;k<n;k++)
    {
    a[k]=sc.nextInt();
    min=min+a[k];
    }
    min=min+a[0];
    for(int j=0;j<n;j++)
    {
    ps=prefix(a,j+1);
    ss=suffix(a,j+1);
    sum=ps+ss;
    if(min>sum)
    {
    min=sum;
    g=j+1;
    }
    }
    System.out.println(g);
    }
    }
    }

In your main function, you haven’t specified dimension to your array

int a[]=new int[];

And please check the logic of your solution.

You have not assigned size to an array

//