Class ArrayUtilsClient

java.lang.Object
it.unimi.di.prog2.s06.ArrayUtilsClient

public class ArrayUtilsClient extends Object
Client code for ArrayUtils.
  • Constructor Details

    • ArrayUtilsClient

      private ArrayUtilsClient()
      .
  • Method Details

    • main

      public static void main(String[] args)
      Receives a size as command line argument, then initializes an array of that size filled with Integer.MAX_VALUE. Then reads integers from standard input and inserts them in the array if not already present, keeping the array sorted and of the same size (discarding the last element at every insertion). Finally, prints the array.
      Parameters:
      args - the size of the array.