Sorted Array challenge1

hey i am submitting the code…but its showing compile time error again and again.
my code is :
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int j = 0;
int n = sc.nextInt();
long[] a = new int[n];
for(int i = 0; i < n ; i++)
{
a[i] = sc.nextInt();
System.out.println(a[i]+" ");
}
for(i = 0 ; i < n - 1; i++)
{
if(a[i] < a[i+1])
j++;
}
if(j == (n-1) )
{
System.out.println(“true”);
}
else
{
System.out.println(“false”);
}
}
}

Hi @AnshulBansal,you don’t have to print the array,just take its input.

Hi @AnshulBansal
As you are not responding to the thread, I am marking your doubt as resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.

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.