About 64,300 results
Open links in new tab
  1. java - How to efficiently remove duplicates from an array without …

    How about this one, only for the sorted Array of numbers, to print the Array without duplicates, without using Set or other Collections, just an Array: public static int[] removeDuplicates(int[] …

  2. java - How do I remove repeated elements from ArrayList ... - Stack ...

    Oct 15, 2008 · If you don't want duplicates in a Collection, you should consider why you're using a Collection that allows duplicates. The easiest way to remove repeated elements is to add the …

  3. Remove duplicates from a list of objects based on property in Java 8

    Apr 16, 2015 · Closed 6 years ago. I am trying to remove duplicates from a List of objects based on some property. can we do it in a simple way using java 8 List<Employee> employee Can …

  4. java - How to remove duplicates from a list? - Stack Overflow

    May 17, 2010 · the correct way to remove duplicates from a list in Java is to use a Set. And you can't just override equals () without overriding hashCode () as well.

  5. java 8 - Remove duplicate from List java8 - Stack Overflow

    Jul 31, 2017 · I have a class below, and wanted to remove duplicate person which contain same name, how to do by using Java8 Lambda, expected List contains p1, p3 from the below. …

  6. Remove duplicate values from HashMap in Java - Stack Overflow

    Jul 23, 2013 · Remove duplicate values from HashMap in Java Asked 12 years, 3 months ago Modified 3 years, 3 months ago Viewed 120k times

  7. 26. Remove Duplicates from Sorted Array - Java - Stack Overflow

    Nov 19, 2020 · Question : Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length. Do not allocate extra space for …

  8. Removing duplicates from a String in Java - Stack Overflow

    I am trying to iterate through a string in order to remove the duplicates characters. For example the String aabbccdef should become abcdef and the String abcdabcd should become abcd …

  9. Remove duplicate from a java collection - Stack Overflow

    Sep 12, 2018 · Remove duplicate from a java collection Asked 7 years ago Modified 7 years ago Viewed 3k times

  10. java - How to remove duplicate objects in a List<MyObject> …

    1 I tried doing several ways for removing duplicates from a list of java objects Some of them are 1. Override equals and hashCode methods and Converting the list to a set by passing the list to …