Computer Science, asked by saqlain11, 9 months ago

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 simabhadu007
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