Answer:
Begin.
WRITE ''enter test array''
READ test array
test [ ] = new_int [ ] { enter test array here, separated by comma}
int [ ] positives = Arrays.stream(test). filter(x -> x >= 0).toArray();
System. out. println( " Positive array");
for (int i : positives) {
System.out.print(i+ "\t"); }
WRITE positive array
End
Explanation
The pseudocode for the alogirithm has been simplified above, it is implemented in Java 8