У меня есть массив ниже [code]int[] a={1,2,3,1,1,2,2,1,3,2,1};[/code] and i want to print all 1 in starting and then all other value as it is in array using java 8. Below should be output: [code]{1,1,1,1,1,2,3,2,2,3,2}[/code] Below are my attempt in Java 7: [code]int[] a={1,2,3,1,1,2,2,1,3,2,1}; List lst = new ArrayList(); for(int i=0;i
I have below array
int[] a={1,2,3,1,1,2,2,1,3,2,1};
and i want to print all 1 in starting and then all other value as it is in array using java 8.
Below should be output:
{1,1,1,1,1,2,3,2,2,3,2}