I want to filter the CC
addresses of the array and want to collect it to the same array,
FOR EXAMPLE
String[] ccAddress = emails.split(";");
ccAddress = Arrays.stream(ccAddress)
.filter(adr -> "".equals(adr) == false)
.collect(Collectors.toArray);// ?????
My question is, 'Is there any direct way to collect filtered elements to the array in Java8' ?
NOTE : I know I can simply collect them to List and write list.toArray()
to get array but that is not my question.