string remove duplicate method in java

Solutions on MaxInterview for string remove duplicate method in java by the best coders in the world

showing results for - "string remove duplicate method in java"
Nick
31 Sep 2019
1public static void main(String[] args) {
2
3        String result = removeDup("AAABBBCCC");
4        System.out.println(result); // ABC
5
6public static  String  removeDup( String  str) {
7        String result = "";
8        for (int i = 0; i < str.length(); i++)
9            if (!result.contains("" + str.charAt(i)))
10                result += "" + str.charAt(i);
11        return result;
12    }
13}
Francisco
12 Jun 2017
1import java.util.*;
2
3public class RemoveDuplicatesFromArrayList {
4
5    public static void main(String[] args) {
6        List<Integer> numbers = Arrays.asList(1,2,2,2,3,5);
7
8        System.out.println(numbers);
9
10        Set<Integer> hashSet = new LinkedHashSet(numbers);
11        ArrayList<Integer> removedDuplicates = new ArrayList(hashSet);
12
13        System.out.println(removedDuplicates);
14    }
15}
16
Jensen
26 Feb 2019
1String fullString = "lol lol";
2String[] words = fullString.split("\\W+");
3StringBuilder stringBuilder = new StringBuilder();
4Set<String> wordsHashSet = new HashSet<>();
5
6for (String word : words) {
7    if (wordsHashSet.contains(word.toLowerCase())) continue;
8    wordsHashSet.add(word.toLowerCase());
9    stringBuilder.append(word).append(" ");
10}
11String nonDuplicateString = stringBuilder.toString().trim();
Joseph
12 Aug 2016
1public static <T> ArrayList<T> removeDuplicates(ArrayList<T> list){
2  Set<T> set = new LinkedHashSet<>(list);
3  return new ArrayList<T>(set);
4}
Yves
13 Aug 2018
1List<Integer>numbers = Arrays.asList(1,2,2,2,3,5); // [1, 2, 3, 5]
2System.out.println(numbers);
3
4Set<Integer> hashSet = new LinkedHashSet(numbers);
5ArrayList<Integer> removedDuplicates = new ArrayList(hashSet);
6System.out.println(removedDuplicates); // [1, 2, 3, 5]
queries leading to this page
java 8 remove duplicates from arrayjava remove duplicates from string until no duplicateshow to remove duplicates in a string java 8java best way to remove duplicatesjava program to remove duplicate words in given stringhow to remove repreating elemetns in a array list in javaremove duplicates java arraylisthow to remove duplicates in a arraylist javaarray remove duplicates javajava list duplicatedremove duplicate number from string javaeliminate duplicates from list java 8java remove duplicates from listjava arraylist remove duplicateremove duplicates from arraylist in java 8how to remove duplicates in a string javaremove duplicates from an array javaremove duplicates from sorted array javahow to remove duplicate strings in javahow to get rid of duplicates in an array javaremove duplicates from array string javaremove duplicates from string java 8remove all duplicate elements in array javahow to delete duplicates from arraylist in javaremove duplicates int array javajava program to remove duplicates from arrayhow to remove duplicates from list in java without using inbuilt functionremove duplication array javaremove duplicate from array list using collection classremove duplicates from stack javabest way to remove duplicates from a list in javaarraylist remove duplicatesjava list stram duplicate removeremove duplicate arraylist from array of arraylist javahoow to loop through a sorted array and remove duplicates in javaremove the duplicate elements in sorted array javaget duplicates in arraylist javadeleting duplicate elements in list in javais there is any duplicates allowed in arraylisthow to remove duplicates from array in javahow to get al the duplicate values of an arraylistarraylist no duplicatesremove duplicates array javaremove duplicates from string in javaremove duplicates in set javajava arraylist with no duplicatesremove duplicates items from list in androidjava remove duplicate from int 5b 5dremove duplicate values in list javaremove duplicate elements in an array in javaremove duplicate in array javaremoving a duplicate character in a string java method java remove duplicates in array 27how to skip same elements in arraylist javawhats the best way to remove duplicates from arraylisthow to remove duplicate from a string in javajava remove duplicates from collectionremoving duplicate words from a string in javasort method in java remove duplicates removing duplicates from array in javaarraylist remove duplicates java 8how to remove repeated elements in an arraylist in javaprogram for removing duplicated words from string javaremove duplicate words from array javaremove duplicates in list in javaarraylist remove duplicates javahow to remove non repeated elements in an array in javajava remove duplicated values in listjava 2b dedup listandroid how to remove the redundant entries from arraylistremove duplicates from array java using loopduplicating elements in an arraylist javadelete duplications in two arrays javahow to remove duplicate value from arraylist in javaremove duplicate values from list javaremove duplicates in string array javaarraylist duplicate valueshow to remove duplicates from list in javaremoving repeated value in list javahow to delete duplicates in array javaremove duplicates method javaremoving duplicate element from unsorted array in javahow to remove all duplicates from a given string in javaremove duplicate objects from array javajava arraylist string remove duplicatesremove duplicates in string javahow to remove the duplicate character from stringhow to remove duplicate in arraylistjava fill list with no duplicateshow to make arraylist remove 28 29 remove one value from the duplicatesjava two list remove duplicatesjava remove all duplicate values from arrayget unique values from stringlist javaarraylist remove unique elementdoes array sort remove duplicates javaremove duplicates from list collection javajava remove duplicates from sorted arrayhow to clear duplicate elements in list javaprogram to delete all repeated words in string in javaremove duplicate elements from an array in javahow to remove duplicates in arraylistremove duplicates from 1000 records from list in java 8 o 28n 29eliminate duplicate elements from array in javalist method to delete duplicates javahow to remove duplicates from array javaremoving duplicate string in javahow do i remove repeating items in an array listjava remove double elements from listlist repeat javaarraylist remove 28 29 with duplicates javajava stream dedupe listhow to remove duplicates in a list javajava remove duplicate list valuesremove duplicate of list streamremove duplicates from array list javaremoving duplicates from array javaremove duplicates in array in javafilter duplicates javahow to remove repeated numbers in array javahow to remove duplicates in arraylist in javaremove duplicates from array java in orderhow to remove all duplicates from an array javajava remove duplicates from string arrayjava strings remove duplicate charactersjava remove duplicate strings from arrayhow to remove duplicates in array in javaremove duplicates from string array javaremove duplicates in java 8how to remove duplicate code in javaremove duplicates in string javajava remove all duplicates from listhow to eliminate duplicates in a list in javahow to remove duplicate in array javaeliminate duplicates in array javaremoving duplicate stringremove duplicates in list javastring remove duplicate method in javahow to avoid duplicates in list javajava remove duplicates from list algorithmhow to remove duplicate value in arraylist in javajava stream java remove duplicatesremove all duplicate from list javaarray remove duplicates from array javaremove duplicates in stringremoving duplicates from astring in javahow to remove duplicates in string in javaremoving duplicates from string in javaremove repeated elements in arraylist javaremove all duplicate characters from a string in javaremove duplicate number javahow to find duplicates from an arraylisthow to delete dupliacte element in arraylist in javadelete duplicates from array javahow to remove duplicates in the arraylistremove duplicates in an arraylist javaremove duplicates from java listdumplicates arraylist elementsdelete duplicates in list javawrite a java program to print after removing duplicates from a given stringhow to eliminate duplicate in array javahow to remove duplicate items from list in androidremove duplicates number java programremove repeated elements in array javaremove duplicates from arraylist javaremove duplicate records from arraylist in javahow to skip same elements to print in arraylist javaget distinct data from list javahow to remove duplicate data from list in javawhat are the two ways to remove duplicates from arraylist 3favoid duplicates in arraylist javaduplicates removed list in javajava array remove duplicatescheck duplicates and remove in arraylist javaremove duplicate from two array git javafinding duplicates javajava code to remove duplicate characters from string in javahow to remove duplicates in bst in javaremove fuplicates from java listremove duplicates from array using for loop in javaremove duplicate words in javaremove duplcaite fromlist javaarraylist eliminate equal stringshow to get rid of duplicates in javaremove duplicate element in array javaandroid java eliminate duplicate or redundancies in the arraylisthow are duplicates removed from a given array in java 3fremove duplicate value from array in javaremove duplicate characters in a stringjava array eliminate duplicatesjava collection void duplicatesremove the duplicate elements in string in javaremove both duplicates in list javaremove duplicates from array java programhow to eliminate duplicates in javaremove duplicates from list java 8 remove repeated values from array javajava without duplicateremove duplicates java listremove duplicate strings from java arraylistwap to remove duplicates from an unsorted array of strings in javamethod to remove duplicates in a list javaremove duplicates from the list javasort in java while removing duplicateshow set avoid duplicates in javajava remove duplicates arraylisthow to remove duplicate words in javajava remove duplicates from a listremove duplicate string collection in java write the following method that returns a new arraylist the new list contains the non duplicate elements from the original list also 2c write a test program to test this method public static 3ce 3e arraylist 3ce 3e removeduplicates 28arraylist 3ce 3e list 29java function to remove duplicates in arraycollection remove duplicates javahow to remove duplicate elements from list in javajava 8 stream remove duplicates from listremove duplicates in java from stringremove duplicates that already in a string javahow to use bubble sort to remove duplicates from an array in javaremove duplicates from unsorted array 3f javaremove duplicated characters from a string javajava 8 delete duplicates from listjava get not duplicate elements of arraylisthow to make arraylist remove 28 29 removes one value from the duplicatesjava stream remove duplicateshow to remove duplicate values in string array in javadelete repeated elements in array javajava program to remove duplicate element in an arrayjava solution for removing duplicates from integer array 3awill remove duplicates from list remove from top or bottom in javaremove the duplicate elements in array in javahow to remove dublicates from list using streams 3fremove duplicates javaa method that takes an integer array argument and removes all duplicates from the array in javajava program to remove duplicate elements from an arrayremove string duplicates javahow to remove duplicate elements from a list in javajava 8 eliminate list duplicateshow to remove duplicates arrays in javawrite a program to remove duplicate elements in an array in javaremoving duplicate values from array in javaremove duplicate value list javahow to remove duplicate words in a sentence using javahow to remove duplicates in java bagjava program to remove duplicate numbers in an arrayremove duplicates from arraliitsremove duplicate words in string in javaremove repeated characters from a string in javajava ordered list no duplicatesjava array filter duplicateswrite a method to remove duplicate elements from an array in kavajava remove duplicate strings from arraylistjava remove duplicate from listjava program to remove repeated characters in a stringremove list duplicates java 8how to remove duplicate elements from the array in javahow can we remove duplicates from two string using collection javaremove duplicates from int array in javaremove unique items from list javaremove duplicates from 2 arrays javajava remove duplicate words from stringremove duplicates in an array javahow to remove duplicate elements in arraylistjava program to remove duplicate words in a sentenceremove duplicate substring from string in javaremove duplicate characters in a string javaduplicates in list javaremoved duplicate vlaues in list java remove duplicates function in javahow to remove duplicate element from arraylist using java8write a java program to remove all duplicate characters from the given string and return the resultant string how to remove duplicates from the array in javaremove duplicates from a list javaremove duplicate words from string in javalambda remove duplicates listdelete redundant letter string javaremove duplicates from sets javahow to remove duplicate elements in a collection javaduplicate arraylist in javajava progrma to remove duplicates from ana rrayremove duplicate element in an array in javahow to remove duplicates arrays in java using methodshow to remove duplicate elements of an array in javahow to remove duplicates in list in javaprogram to remove duplicate elements in an array in javaremove duplicates using stream javajava program to remove duplicates from email list in javahow not to repeat same name in arraylist javaremove duplicate in an array javafilter list for duplicates in javaremove all duplicate value from list in javaandroid remove duplicates from arraylisthow to remove duplicates from array in java using loopremove duplicate characters in a string in javaadd item repeat to set list javaarraylist no duplicateremove duplicates in java listjava 8 remove duplicates from string listhow to remove duplicates from an arraylistremove duplicates from unsorted array javaremove duplication in javaremove duplicates java 1 2c8remove duplicate elements from string javarepetirion of item in arraylist javaeliminate duplication from array in javaremove duplicates of arraylistlist function that removes duplicates javahow to remove duplicate values in string array in java 8remove duplicate strings in a list javaremove duplicate elements in unsorted array in javahow to eliminate the elements that duplicate in java java 8 stream filter duplicateshow to remove duplicates in an arraylistexplaination on how to removing duplicates in an array using the sorting method in javaremove duplicates in java 8 listremove duplicated from array in javaremove duplicates in aray in javais there is any duplicates allowed in arralistremoving duplicates from arraylist in javaremove duplicate value from string in javahow to remove duplicate values from an arraylist in javaremove duplicate values from array list androidlist java functions duplicate remove duplicates from array in java without using inbuilt function remove duplicates string in javaremoving duplicate words javaremove duplicate elements from unsorted array in javacompare 2 arrays and remove duplicates javahow to eliminate duplicates in list javadelete duplicates in a list javaremoving duplicates java listjava 8 list eliminate duplicatesremove duplicates from sorted list javaprinting non duplicate items in arraylist javahow to delete duplicates from list in javaremoving duplicate words from string in javahow to eliminate duplicates in arraylistremove duplicate code definition javaremove duplicates in arraylist javahow to delete all duplicate characters from string in javaarraylist remove duplicate elementshow to remove duplicates in javaremove duplicates from array list in java 22write a java program to remove the duplicate elements of a given array and return the new length of the array 22java remove duplicates from string listjava function to remove repeated valuesremove duplicates using sum method javajava remove all double entries from listremove duplicates from a string in javahow to remove duplicates from an array javaremove duplicate elements from array in javaremove duplicates from array java in placejava remove duplictesremove duplicates from stringjavaremove duplicates from sorted array solution in javaremove duplicates in list jaajava list without duplicateshow to remove dupllicates from an array in ajvajava8 duplicate removalstream 28 29 collection dedupe java remove duplicates from array using javaremove duplicate letters from a string in javahow to remove duplicate values from array in javacombine 2 arrays and remove duplicates javahow to remove duplicates from arraylist in javajava remove equal element of a listhow to remove duplicates in a arrayliststream dedupe javaremove duplicate data in javahow to remove duplicate data in javaaremove duplicates in array javaarray duplicate remove in javajava list without duplicatejava remove duplicate string from listhow to remove dublicate from array javadelete string 5b 5d duplicates javajava store elements without duplicateremove the duplicates from the list in javaremove duplicate data from arraylist in javajava list delete duplicatesjava list remove duplicatesarraylist delete duplicates javaremove duplicate in list using in javahow to remove list duplicates javaremove duplicate characters in a string java in javajava chart array remove duplicatesremove duplicates from array return array javajava 8 list remove duplicatesremove all duplicate alaphabes array javaremove all duplicates from the stringhow to remove duplicate elements from sorted array in javaremove duplicate names from array javaremove duplicates word from string javalist without duplicate javajava remove duplicates from arrayremove duplicates from string java using for loopjava list with duplicatesremove duplicates from arraylist using one listremoving duplicate from an array using collectionsremove duplicates later in javaset in java eliminate duplicatesjava code to remove duplicate words in a stringremove duplicates from string array in javaremoving duplicates in an array in javaremove dublicate in javaremove duplicates in javasjava stream filter duplicatesremove duplicate elementes from array javaremove duplicates from string array java without using collectionsjava program to delete dublicated element from the soreted arrayhow do i get all same strings in array list javaremove duplicates in javajava remove dulpicateremove duplicate elements in array in javajava program to remove duplicate words in a stringmethods to remove duplcated values in arraylistjava code to remove duplicates from listjava 8 remove duplicates from listhow to remove duplicate integer values in list javaremove duplicates from list 3cstring 3e javahow to remove duplicate from array in javaset java duplicatesdedupe list javato remove repeated characters from a string in javawrite a program to remove duplicates from array in javajava remove duplicated numbers from beginninghow to skip same elements in list javajava how to remove duplicates from arrayhow to remove duplicates from an array in javahow to remove duplicates from string in javajava program to remove duplicatesremove duplicate from string in javaremove duplicates arraylist javajava remove arraylist duplicatesremove repeated values in list javaremove duplicate from array listhow to remove duplicates in an array in javahow to remove duplicate params in javaremove duplicate elements from an arraylist using hashsetremove duplicate and mearge two array java javaarraylist data repeatingdelete duplicate jdkremove all duplicates from list javaremove duplicates from given string in javadelete duplicate from list javaremove duplicate array in javahow to remove the duplicates from array in javastop arraylist have duplicate valueshow to remove duplicate elements in javajavalist remove duplicateremove duplicates from list javahow to remove duplicates in arraylist of objects in javaremove duplicate from sorted array javaremoving duplicates from arraylist of arraylist in javaremove duplicate elements from arraylistremove duplicaterepeated words string javaarraylist dublicatesjava stream remove duplicates using setremove duplicates list javaclear duplicates arraylistjava list no duplicatesremove duplicates program in javastream liste remove duplicateremove duplicates from array java 8erase duplicate from arraylist javajava delete duplicates from listwrite a java program to remove the duplicate elements of a given array and return the new length of the array remove duplicates of list javaremove duplicates from string sorted javaremove duplicate items from arraylist javahow to remove duplicates in object arraylist java remove duplicates of a list javaremove duplicates from string java without using collectionsarraylist drop duplicatesremove duplicate in array in javahow to remove duplicates values in an array in javajava 8 list remove duplicatedremove duplicate numbers from array in javajava input arraylist delete duplicatesjava arraylist remove duplicatesjava array dulicate removeremove duplicates from string list javawill arraylist remove remove the duplicate elementsjava remove duplicate characters from stringjava filter duplicates from listalgorithms to remove duplicates from object array javaalgorithm for removing duplicates from arraylistdelete duplicate values in arraylist androidremove duplicates string javaremoving duplicate element from array in javaremove a duplicates from array in javajava remove all duplicates from arraylisthow to remove duplicate from a list in javaremove dupliacte from string javahow to remove duplicates occurrences in java arrayremove duplicates in string in javahow to remove duplicates from list javajava remove doubles from listjava algorithm remove duplicates from arraywhat are the two ways to remove duplicates from arraylistjava arraylist duplicates removeset remove all duplicateshow to remove duplicate number in javahow to remove duplicate from stringhow to remove duplicate in arraylist and add in anotheradd objects into collection without duplicatesremove all duplicate elements array javaremove same arraylist from list of arraylist javahow to convert an arraylist to a list without duplicates in javamethod which removes duplicates javajava delete duplicate listremove duplicates from sorted arrayjavahow to filter redundant data in javahow to remove dublicates in the array javahow to remove duplicate numbers in javaremove duplicate characters from string in javaremove duplicates from sorted array in javanon duplicate arraylisthow to delete duplicates in java calling methodstring remove duplicate in javaremove duplicates from array javahow to remove arraylist duplicatesstring remove duplicateshow to delete duplicates using set in javafrom array list remove duplicat string javajava 8 delete duplicates from flatmapremove duplicate from list javajava list eliminate duplicatesremove duplicate values in array javaduplicate removal in sorted array javaremove duplicate java how to not alllow duplicate entries to a list javahow to read a list and remove duplicates in javajava code to remove duplicate elements in an arrayandroid java remove duplicatesduplicate function in javaalgorithim to duplicate arraylist javaarraylist does not allow duplicate elementsremove duplicate values string function in javajava delete duplicates in listhow to remove duplicate elements from array in java androidremove duplicates in a string javahow to remove duplicate arrays in an sorted arrays in java using a defined methodjava remove duplicatesremove duplicates from array in java 8java remove duplicates but only keep doublejava 8 arraylist of integer remove duplicatesclear duplicates from list javaremove the duplicates in list in javato remove duplicates from array in javahow to remove all duplicate string in arraylistjava int array remove duplicatesremove duplicates from array 3f javajava array stream remove duplicatesjava list remove duplicateremove array duplicates javajava remove duplicates from list stringdelete duplicates javafilter double in list javahow to remove duplicates in string javajava arraylist without duplicatesremove duplicate characters in java stringremove duplicates java arrayremove repeated elements in an array javaremove duplicate values in java arrayjava list of list remove duplicatesjava remove duplicate from arrayhow to remove duplicates from a string listjava streams filter duplicateslist remove duplicate string javaremove duplicate from array in javaremove duplicate characters from a given string javahow to delete duplicate value from list in androidhow to remove duplicate elements from arraylistremove duplicates from arraylistremoving duplicates from list in javaremove duplicates from a sorted array javaremove duplicates string from array javahow to delete duplicate elements in list javaarraylist remove duplicates androidremove object from list on the basis of buplicate name in javajava arraylist delete duplicateshow to remove duplicate data in javahowto remove duplicate element in java 8write a program to remove the duplicate elements and return the new array in javaeliminate duplicate elements from string in javahow to remove duplicate values from arraylist without use distinct function in javaremove duplicate code in javalist remove duplicates javaremove duplicates from array java inbuilt functionremove the duplicates from the array in javaremove the dublicate javaremove duplicated array javaremove duplicaes java arraydeclaring an arraylist of a class that contain duplicate elements in javajava remove duplicate values from arrayhow to remove duplicate elements from array in javaremove duplicates and sort array javaremove duplicate data from list in javajava 2bremove duplicates from a listremoving duplicates from an array javahow to remove array non duplicates in javaremove duplicates words from string javajava remove duplicates from list of fileremove duplicate from 2 array git javajava remove duplicate number values from arrayremove duplicates from list in javaremove duplicate characters from string javahow to remove duplicate number from array in javajava remove duplicates frfom arraylistremove duplicates in a string array javahow to remove duplicate string from arraylist in javaarraylist of type string in java how to remove duplicateshow to remove duplicate elements from the list in javaremove repeated characters in a string in javajava remove duplicates from unsorted arrayhow to remove duplicates using methods in javajava remove duplicates from arraylistremove duplicate in java stringremove duplicate words from string javaremove duplicate number from array javaarray remove duplicate in javajava combine duplicates in listhow to remove duplicate values in list javaremove duplicaets using a jav listwrite a program in java to remove duplicate characters in a stringjava remove duplicates from arraylist of objects remove duplicate values array javahow are duplicates removed from a given array in javajava how to remove duplicates from listhow to remove duplicate strings from a list in javaarray remove repeated data javajava program to remove the duplicate elements of a given array and return the new length of the array java removing duplicates from an arrayremove duplicates from ilst javaremove duplicate value from array javasorting an array in java without removing duplicatesremove duplicate in arraylist javaremove duplicates in an array injvajava arraylist duplicate entrieshow to remove duplicates in array javahow delete same integer inside list java java remove repeated characters from stringhow to remove duplicates from a string list javahow to remove duplicates from an array list javaremove duplicates from list javaremoveduplicates method in javaremove duplicates from list string javaremove same elements from arraylist javaarraylis java exlude data with samedelete duplicates in array javajava list duplicateremove duplicate elements from array java without sortinghow to remove the duplicate character from string 3fremove duplicates from the list arrayjava string remove duplicate charactersjava remove duplicate words from arrayunsorted array remove duplicates in javajava function to remove object duplicated from listarraylist unique elements java programshow to make sure there are no duplicatesin arraylist and sortedremove duplicate in a a stringhow to remove duplicates from an array list in javahow to remove duplicate characters from string in javaremove duplicates from two arrays javahow to remove duplicate elements javajava arraylist duplicate elementsremove duplicates from arraylist in javawrite a program to remove duplicates from array in java 3fjava remove duplicates from stringrepeated values in a list in java gets deletedremove duplicates from a sorted arraylistjava function filterduplicatesdatajava remove duplicate array elementjava remove duplicates more than doublejava remove duplicates froma linejava no duplicateshow to remove from arraylist when there same valueshow to remove duplicate elements from the array in java 3fremove duplicate in javahow to remove duplicate values in list in javawrite a program to remove elements from an array list in one iteration also try removing duplicatesremove duplicates elements from list java39 to remove duplicates in a an array javaremove duplicate string in javaremove duplicates from a given string javaeliminate duplicates in arrays javahow to remove duplicate elements from two arrays in javaremove repeated elements in string javaremove duplciate javahow to remove repeated characters in string in javaremove duplicate number in array javaremove duplicates from array in javaremove duplicate and sort elements from array in javahow to remove duplicate values fronm listjava remove duplicates from list javajava remove all duplicates from stringhow to make arraylist only remove one thing and leave the duplicateshow to remove duplicates from deque in javajava 8 code to remove duplicate values from listjava array duplicate removeremoveduplicates javajava arraylist duplicateshow to remove string list duplicates javajava 8 list to map remove duplicateshow to find duplicates from an array listjava collection remove duplicatesremove duplicate elements from array javahow to remove duplicates in string array javaremove duplicates from lists javaremove duplicates from string javaremove duplicate java easyremovind duplicates from array i javaremove duplicates from email list in javadelete duplicate elements in two array javajava list remove if duplicateshow to remove duplicates in a list in javalist duplicate in javaremove duplicate and mearge two array javaremove duplicate element from array javahow to delete repeated element in list in javahow to remove repeated values i array javahow to remove duplicates from an array of strings in javadrop duplicate in arraylisthow to delete duplicate value in array listarraylist duplicatesremove duplicate enteries from array javastring remove duplicate method in java