I am getting compile time error for this code. Not getting what it is about, please help. This is some practice question on codechef.
Tried to find on web but unable to find similar answers.
The code is-
import java.util.*;
class missp
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
int i,j,n,c=0;
int a[];
while(t>0)
{
c=0;
n =sc.nextInt();
a[]=new int[n];
for(i=0;i<n;i++)
a[i]=sc.nextInt();
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]==a[j])
{
c++;
break;
}
}
if(c=0)
System.out.println(a[i]);
break;
}
t--;
}
}
}//end of class
the errors are-
Main.java:16: error: not a statement
a[]=new int[n];
^
Main.java:16: error: ';' expected
a[]=new int[n];
^
Main.java:16: error: ']' expected
a[]=new int[n];
^
Main.java:16: error: ';' expected
a[]=new int[n];
^
4 errors