Converting String Array to an Integer Array

47

Converting String Array to an Integer Array -

int[] arr = Stream.of(new String[]{"1", "2", "3"})
                  .mapToInt(Integer::parseInt).toArray();
System.out.println(Arrays.toString(arr));

Comments

Submit
0 Comments