how to preset an array java code example Example: how to preset an array java int[] arr = { 1, 2, 3, 4, 5 };