Class ArrayUtilsClient
java.lang.Object
it.unimi.di.prog2.s06.ArrayUtilsClient
Client code for
ArrayUtils
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Receives a size as command line argument, then initializes an array of that size filled withInteger.MAX_VALUE
.
-
Constructor Details
-
ArrayUtilsClient
private ArrayUtilsClient().
-
-
Method Details
-
main
Receives a size as command line argument, then initializes an array of that size filled withInteger.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.
-