I have an integer array sorted in descending order, and I have to remove duplicate elements and return remaining values from the array (without using java Collections).
ex:This is my array,
int a[]={12,12,8,6,4,4,2,1}
and The o/p should be,
{8,6,2,1}
how to achieve this using Java?