import java.util.*; public class c02 { public static void main(String[] args) { String[][] catalogue = new String[99][4]; boolean endProg, inputOK; String input, product, code, price, phrase; int count = 0; Scanner sc = new Scanner(System.in); // ArrayComparator ac=new ArrayComparator(0, "asc"); do { endProg = true; System.out.print("Enter prodduct description (# to stop) : "); input = sc.nextLine(); if (input.equalsIgnoreCase("#")) { endProg = false; break; } product = input; System.out.print("Enter prodduct code: "); input = sc.nextLine(); code = input; System.out.print("Enter prodduct unit price: "); input = sc.nextLine(); price = input; System.out.print("Enter prodduct unit phrase: "); input = sc.nextLine(); phrase = input; catalogue[count][0] = code; catalogue[count][1] = product; catalogue[count][2] = price; catalogue[count][3] = phrase; count++; } while (endProg); Arrays.sort(catalogue, new ArrayComparator(0, "asc") {}); System.out.println("Your Catalog: "); ...
error for the following code:
Compiling 2 source files to I:\TestCode\build\classes I:\TestCode\src\c02.java:44: error: cannot find symbol Arrays.sort(catalogue, new ArrayComparator(0, "asc") {}); symbol: class ArrayComparator location: class c02 1 error I:\TestCode\nbproject\build-impl.xml:915: The following error occurred while executing this line: I:\TestCode\nbproject\build-impl.xml:268: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 1 second)