Copies the given array and adds the given element at the end of the new array. The new array contains the same elements of the input array plus the given element in the last position. The component type of the new array is the same as that of the input array. If the input array is {@cod
(final boolean[] array, final boolean element)
| 238 | * @since 2.1 |
| 239 | */ |
| 240 | public static boolean[] add(final boolean[] array, final boolean element) { |
| 241 | final boolean[] newArray = (boolean[]) copyArrayGrow1(array, Boolean.TYPE); |
| 242 | newArray[newArray.length - 1] = element; |
| 243 | return newArray; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Inserts the specified element at the specified position in the array. |