System.out, presumably because it's simpler.
git add .,
I like doing lots of randomized tests. How do you design a randomized test? Often, you start with the answer and then work backwards.
average: Pick a random number,
Integer.MAX_VALUE/2. Pick another random number,
o, between 0 and
average(r+o, r-o)should be
sort: Build a sorted array. Permute it. Sort it. See if you get something equivalent to the original array.
You should also consider the likely edge and corner cases, typically involving extremes.
Systematic tests are also great. We'll look at a systematic test for binary search.