About 1,730,000 results
Open links in new tab
  1. Java Program to Print All the Repeated Numbers with Frequency in an Array

    Nov 27, 2020 · Given an array that may contain duplicates, print all repeated/duplicate elements and their frequencies. Below is the discussion of this program by two approaches: Using a …

  2. Find Duplicate Elements and Their Frequency in an Array in Java

    Jan 5, 2023 · Learn how to find duplicate elements and their frequency in an array using Java. This guide provides step-by-step instructions and code examples.

  3. Java 8 streams to find the duplicate elements - Stack Overflow

    Dec 28, 2014 · I am trying to list out duplicate elements in an integer list using Streams of JDK 8. For example: // Duplicates are {1, 4} List<Integer> numbers = Arrays.asList(new …

  4. Program to Print the Duplicate Elements of an Array - Java

    Jan 20, 2025 · Using a HashMap allows us to count occurrences of each element. We iterate over the array and add each element to the HashMap, updating the count as we go. Elements with …

  5. How To Find Duplicates In Array In Java? - 5 Methods - Java

    Jan 21, 2019 · In this post, we will learn to find duplicate elements in array in java using Brute Force method, using Sorting method, using HashSet, using HashMap and using Java 8 …

  6. Repeating element of an array in java - PrepInsta

    In this section, we will learn the Program to Find Repeating element of an array in java.Given an array, print all element whose frequency is not equal to one. We will discuss different …

  7. Java Program to print the duplicate elements of an array

    Jun 22, 2022 · In this tutorial, we will write java programs to print the duplicate elements of an array. For example, if an array is {1, 2, 3, 2, 3, 5} then the program should print the elements …

  8. Java Program to Find Duplicate Elements in an Array - Java Guides

    This guide will show you how to create a Java program that identifies and displays duplicate elements in an array. Problem Statement. Create a Java program that: Takes an array of …

  9. How to Find Duplicate Elements in a Java Array

    May 4, 2023 · In this tutorial, we will explore different methods to find duplicate elements in a Java array, including using nested loops, sets, streams, and hash tables. We will also discuss the …

  10. Find duplicate elements in an array - GeeksforGeeks

    Dec 19, 2024 · Given an array of n integers. The task is to find all elements that have more than one occurrences. The output should only be one occurrence of a number irrespective of the …

Refresh