News

When working with arrays, the Arrays class can be particularly helpful. In this posting, I’ll look at how this class simplifies the copying of arrays and providing String representation of arrays.
Both Arrays.toString(Object[]) and Arrays.deepToString(Object[]) handle null array gracefully, simply returning a String “null”. I tend to use Java Collections far more than I use Java arrays.