I would like to convert an Integer[] but toArray() is giving me Object[]. How can I convert it to String[]?
Stream.of(ids).map(String::valueOf).toArray();
I would like to convert an Integer[] but toArray() is giving me Object[]. How can I convert it to String[]?
Stream.of(ids).map(String::valueOf).toArray();
String[] array = Stream.of(ids).map(String::valueOf).toArray(String[]::new);
String[] a= Arrays.toString(array).split("[\\[\\]]")[1].split(", ");
I think this should work