No such element found

i have submitted the code please see to it iam not able to find out the problem i have included the scanner and added throws Exception at main as well .but still throwing the exception

@Chitwan,
Did you select the correct language while submitting because in your submissions there is an empty template of C++ code.

Yes I have submitted it in Java

@Chitwan,
Can you share your code here? I cannot view it

how do i have to share

i shared it again ,is it visible now?

@Chitwan,

   static boolean isSorted(int arr, int n) {
   	if (n == 0 || n == 1)
   		return true;

   	if (arr[i - 1] > arr[i])
   		return false;

   	return isSorted(arr, n - 1);
   }
In this code, you have not initialized i. Also, declare arr as an array. It is declared like an int.

@Chitwan,

Also print true and false with the returned value from the isSorted function

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.