why it is showing no output and wrong error but it is giving correct output while compiling
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++)
{
a[i]=sc.nextInt();
}
int tar=sc.nextInt();
int num1,num2,num3;
for(int j=0;j<n-2;j++)
{
for(int k=j+1;k<n-1;k++)
{
for(int p=k+1;p<n;p++)
{
if(a[j]+a[k]+a[p]==tar)
{
num1=a[j];
num2=a[k];
num3=a[p];
if(num1<num2 && num2<num3 && num3<num1)
System.out.println(a[j] + “, " + a[k]+”, " + "and " +a[p]);
if(num1>num2 && num2<num3 && num3<num1)
System.out.println(a[k] + “, " + a[p]+”, " + "and " +a[j]);
if(num1<num2 && num2>num3 && num3>num1)
System.out.println(a[j] + “, " + a[p]+”, " + "and " +a[k]);
}
}
}
}
}
}