for array short hand java code example Example: java initialize array shorthand int[] arr = new int[] {1, 2, 3};