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