write a program in java to input a single dimensional array and replace duplicate entries with a zero.
perfect program will be marked as brainliest
Answers
Answered by
0
Answer:
sort(arr) method.
import java.util.Arrays;
public class RemoveDuplicateInArrayExample3{
public static int removeDuplicateElements(int arr[], int n){
if (n==0 || n==1){
return n;
}
int[] temp = new int[n];
int j = 0;
Explanation:
Follow me and mark me as brainlist and give me 10 thanks
Similar questions
Math,
4 months ago
Environmental Sciences,
4 months ago
Social Sciences,
4 months ago
Hindi,
9 months ago
Science,
9 months ago
Chemistry,
1 year ago
Math,
1 year ago