java create private array with values code example Example: java initialize int array int[] arr = new int[n];