Question: Write the following method that returns true if the list is already sorted in non-decreasing order:public static boolean isSorted(int[] list)Write a test program that prompts the user to enter a list and displays whether the list is sorted or not.The program should first prompt the user to enter the size of the list. Sample […]

Read more of this post