Science, asked by Raghu8278, 1 year ago

How to remove duplicates from ArrayList in Java?

Answers

Answered by cutieeee10101
0
HEY MATE.......

HERE IS UR ANSWER.......❤❤

Remove Duplicate Elements in Unsorted Array

1.import java.util.Arrays

2.public class RemoveDuplicateInArrayExample3{

3.public static int removeDuplicateElements(int arr[], int n){

4.if (n==0 || n==1){

5.return n;

6.}

7.int[] temp = new int[n];

8.int j = 0;

Answered by Ashfa002
0
1. Public class remove duplicate array list

2.public static void main ( strings arg)

3. List >strings< l = new array list

4. Add (mango)

5. Add ( banana)

6. Add (apple)

7.add (mango)

8.system.out.println(l.to.string)


That’s it ! Hope it was helpful
Similar questions