[SOLVED] Buggy Search And Sort Buy Reporting with Java source code
Report The Bug From The Following Source Code: import java.util.Arrays; /** * This class looks like it's meant to provide a few public static methods for * searching and sorting arrays. It also has a main method that tests the * searching and sorting methods. * * TODO: The search and sort methods in this class contain bugs that can cause * incorrect output or infinite loops. Use the Eclipse debugger to find the bugs * and fix them */ public class BuggySearchAndSort { public static void main(String[] args) { int[] A = new int[10]; // Create an array and fill it with random ints. for (int i = 0; i < 10; i++) { A[i] = 1 + (int) (10 * Math.random()); } int[] B = A.clone(); // Make copies of the array. int[] C = A.clone(); int[] D = A.clone(); System.out.print("The array is:"); printArray(A); if (contains(A, 5)) { System.out.println("This array DOES contain 5."); } else { System.out.println("This array DOES NOT contain 5....