Java 12 introduced java.lang.Class#arrayType() as a convenience method for Array.newInstance(type, 0).getClass(). To simplify our code and to benefit from potential future enhancements to that implementation in the JDK, we should use that new method where feasible.