how to initialize a set with values from array java code example Example: initialize array with values java int[] arr = {3,6,9,12}; int[] arr = new int[]{1, 2, 3};