// Textbook fragment 02.08 if (insertIndex >= A.length) { throw new BoundaryViolationException("No element at index " + insertIndex); }