# ArrayHelper > Utility class for chunking and combining lists and arrays. `gg.lode.bookshelfapi.api.util.ArrayHelper` --- ## Signature ```java public class ArrayHelper ``` --- ## Static Methods | Method | Return Type | Description | |--------|-------------|-------------| | `chunk(List<T> list, int size)` | `List<List<T>>` | Splits a list into sublists of the given size. | | `combine(List<T> a, List<T> b)` | `List<T>` | Combines two lists into one. | | `combine(List<T> list, T... items)` | `List<T>` | Combines a list with vararg items. | | `combine(T[] array, List<T> list)` | `List<T>` | Combines an array with a list. | | `combine(T[] a, T... b)` | `List<T>` | Combines two arrays into a list. | ### Parameters | Parameter | Type | Description | |-----------|------|-------------| | `list` / `a` / `b` | `List<T>` | Input lists. | | `array` / `a` / `b` | `T[]` | Input arrays. | | `size` | `int` | Maximum chunk size. | | `items` | `T...` | Vararg items to append. | --- ## Usage ```java List<Integer> numbers = List.of(1, 2, 3, 4, 5, 6, 7); List<List<Integer>> chunks = ArrayHelper.chunk(numbers, 3); // [[1, 2, 3], [4, 5, 6], [7]] List<String> combined = ArrayHelper.combine(List.of("a", "b"), List.of("c", "d")); // ["a", "b", "c", "d"] ``` --- ## Related Pages - [[StringHelper]]