Write the following method that returns true if the list is already sorted in increasing 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. A Sample run is provided on the next page. Note that the first number in the input indicates the number of elements in the list.Enter list: 8 10 1 5 16 61 9 11 1The list is not sortedEnter list: 10 1 1 3 4 4 5 7 9 11 21The list is already sortedA shell source code file called Problem3.java has been provided for you to start with.public class Problem3 {public static void main(String[] args) {//Fill in main code here}public static boolean isSorted(int[] list) {//Fill in isSorted code here}}



Answer :

Other Questions