how to put an array in a constructor java code example Example: java initialize int array int[] arr = new int[n];