I am not able to take input , getting noSuchElement Exception .
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int ar[]=new int[n];
for(int i=0;i<n;i++){
ar[i]=sc.nextInt();
}
I am not able to take input , getting noSuchElement Exception .
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int ar[]=new int[n];
for(int i=0;i<n;i++){
ar[i]=sc.nextInt();
}