Tpointtech
    Tutorials
    Python Python Tutorial Django Tutorial Numpy Tutorial Pandas Tutorial Tkinter Tutorial Pytorch Tutorial Flask Tutorial OpenCV Tutorial Java Java Tutorial Servlet Tutorial JSP Tutorial Spring Boot Tutorial Spring Framework Tutorial Hibernate Tutorial JavaFX Tutorial Java Web Services Tutorial .Net Framework .Net Framework Tutorial C# Tutorial ASP.Net Tutorial ADO.Net Tutorial WPF Tutorial
    AI, ML and Data Science Artificial Intelligence Tutorial Machine Learning Tutorial Data Science Tutorial Deep Learning Tutorial TensorFlow Tutorial Artificial Neural Network Tutorial Matplotlib Tutorial Python Scipy Tutorial Cloud Technology Cloud Computing Tutorial AWS Tutorial Microsoft Azure Tutorial Salesforce Tutorial GCP Tutorial B.Tech and MCA DBMS Tutorial Data Structures Tutorial Operating System Tutorial Computer Network Tutorial DAA Tutorial Computer Organization Tutorial Software Engineering Tutorial Data Mining Tutorial
    Web Technology HTML Tutorial CSS Tutorial JavaScript Tutorial Jquery Tutorial Angular 8 Tutorial React Tutorial React Native Tutorial Node.js Tutorial PHP PHP Tutorial MySQL Tutorial Laravel Tutorial WordPress Tutorial CodeIgniter Tutorial Software Testing Software Testing Tutorial Selenium Tutorial JIRA Tutorial JMeter Tutorial Postman Tutorial TestNG Tutorial SoapUI Tutorial Cucumber Tutorial
    Interview
    Technical Interview Python Interview Questions Java Interview Questions .Net Interview Questions C++ Interview Questions React Interview Questions Node.js Interview Questions Angular Interview Questions SQL Interview Questions HR Interview Questions Java Interview Spring Boot Interview Questions Spring Interview Questions Hibernate Interview Questions JDBC Interview Questions Servlet Interview Questions Maven Interview Questions Jenkins Interview Questions Python Django Interview Questions Pandas Interview Questions Express.js Interview Questions Python Coding Interview Questions Python Interview Questions for 5 Years
    Web Interview HTML Interview Questions CSS Interview Questions JavaScript Interview Questions Jquery Interview Questions PHP Interview Questions Laravel Interview Questions AJAX Interview Questions Front-End Developer Interview Questions jQuery Interview Questions Database Interview DBMS Interview Questions SQL Interview Questions PL/SQL Interview Questions Oracle Interview Questions MySQL Interview Questions MongoDB Interview Questions Redis Interview Questions B.Tech / MCA DBMS Interview Questions Operating System Interview Questions OOPs Interview Questions DSA Interview Questions Computer Networks Interview Questions
    Important Interview C Interview Questions Power BI Interview Questions C# Interview Questions Excel Interview Questions C# Interview Questions Machine Learning Interview Questions AWS Interview Questions Microservices Interview Questions MySQL Interview Questions Software Testing Interview Manual Testing Interview Questions Selenium Interview Questions API Testing Interview Questions ETL Testing Interview Questions Mobile Testing Interview Questions Company Interviews IBM Interview Questions Adobe Interview Questions Microsoft Interview Questions Amazon Interview Questions TCS Interview Questions Wipro Interview Questions Accenture Interview Questions
    Compiler
    Online Compilers Python Online Compiler Java Online Compiler PHP Online Compiler C Online Compiler C++ Online Compiler HTML Online Compiler JavaScript Online Compiler TypeScript Online Compiler R Online Compiler Swift Online Compiler Kotlin Online Compiler Go Online Compiler C# Online Compiler Perl Online Compiler Groovy Online Compiler HTML, CSS & JavaScript Online Editor
    Multiple Choice Questions Python MCQ Java MCQ PHP MCQ C Programming MCQ C++ MCQ HTML mcq JavaScript MCQ SQL MCQ Operating System MCQ Computer Fundamental MCQ Computer Network MCQ DBMS MCQ Data Structure MCQ Software Engineering MCQ Cloud Computing MCQ Artificial Intelligence MCQ
    • Python
    • Java
    • JavaScript
    • SQL
    • C
    • C++
    • HTML
    • CSS
    • React
    • Node.js
    • Spring Boot
    • C#
    • PHP
    • MySQL
    • MongoDB
    • AI
    • ML
    • DSA
    • DBMS
    • OS
    • Aptitude
    • Reasoning

    • Fibonacci Series in Java
    • Prime Number Program in Java
    • Palindrome Program in Java
    • Factorial Program in Java
    • Armstrong Number in Java
    • How to Generate Random Number in Java
    • How to Print Pattern in Java
    • How to Compare Two Objects in Java
    • How to Create Object in Java
    • How to Print ASCII Value in Java
    • How to Reverse a Number in Java
    • Java Program to convert Number to Word
    • Automorphic Number Program in Java
    • Peterson Number in Java
    • Sunny Number in Java
    • Tech Number in Java
    • Fascinating Number in Java
    • Keith Number in Java
    • Neon Number in Java
    • Spy Number in Java
    • ATM program Java
    • Autobiographical Number in Java
    • Emirp Number in Java
    • Sphenic Number in Java
    • Buzz Number Java
    • Duck Number Java
    • Evil Number Java
    • ISBN Number Java
    • Krishnamurthy Number Java
    • Bouncy Number in Java
    • Mystery Number in Java
    • Smith Number in Java
    • Strontio Number in Java
    • Xylem and Phloem Number in Java
    • nth Prime Number Java
    • Java Program to Display Alternate Prime Numbers
    • Java Program to Find Square Root of a Number Without sqrt Method
    • Java Program to Swap Two Numbers Using Bitwise Operator
    • Java Program to Find GCD of Two Numbers
    • Java Program to Find Largest of Three Numbers
    • Java Program to Find Smallest of Three Numbers Using Ternary Operator
    • Java Program to Check if a Number is Positive or Negative
    • Java Program to Check if a Given Number is Perfect Square
    • Java Program to Display Even Numbers From 1 to 100
    • Java Program to Display Odd Numbers From 1 to 100
    • Java Program to Find Sum of Natural Numbers
    • Java Program to copy all elements of one array into another array
    • Java Program to find the frequency of each element in the array
    • Java Program to left rotate the elements of an array
    • Java Program to print the duplicate elements of an array
    • Java Program to print the elements of an array
    • Java Program to print the elements of an array in reverse order
    • Java Program to print the elements of an array present on even position
    • Java Program to print the elements of an array present on odd position
    • Java Program to print the largest element in an array
    • Java Program to print the smallest element in an array
    • Java Program to print the number of elements present in an array
    • Java Program to print the sum of all the items of the array
    • Java Program to right rotate the elements of an array
    • Java Program to sort the elements of an array in ascending order
    • Java Program to sort the elements of an array in descending order
    • Java Program to Find 3rd Largest Number in an array
    • Java Program to Find 2nd Largest Number in an array
    • Java Program to Find Largest Number in an array
    • Java to Program Find 2nd Smallest Number in an array
    • Java Program to Find Smallest Number in an array
    • Java Program to Remove Duplicate Element in an array
    • Java Program to Print Odd and Even Numbers from an array
    • How to Sort an Array in Java
    • Java Matrix Programs
    • Java Program to Add Two Matrices
    • Java Program to Multiply Two Matrices
    • Java Program to subtract the two matrices
    • Java Program to determine whether two matrices are equal
    • Java Program to display the lower triangular matrix
    • Java Program to display the upper triangular matrix
    • Java Program to find the frequency of odd & even numbers in the given matrix
    • Java Program to find the product of two matrices
    • Java Program to find the sum of each row and each column of a matrix
    • Java Program to find the transpose of a given matrix
    • Java Program to determine whether a given matrix is an identity matrix
    • Java Program to determine whether a given matrix is a sparse matrix
    • Java Program to Transpose matrix
    • Java Program to count the total number of characters in a string
    • Java Program to count the total number of characters in a string 2
    • Java Program to count the total number of punctuation characters exists in a String
    • Java Program to count the total number of vowels and consonants in a string
    • Java Program to determine whether two strings are the anagram
    • Java Program to divide a string in 'N' equal parts.
    • Java Program to find all subsets of a string
    • Java Program to find the longest repeating sequence in a string
    • Java Program to find all the permutations of a string
    • Java Program to remove all the white spaces from a string
    • Java Program to replace lower-case characters with upper-case and vice-versa
    • Java Program to replace the spaces of a string with a specific character
    • Java Program to determine whether a given string is palindrome
    • Java Program to determine whether one string is a rotation of another
    • Java Program to find maximum and minimum occurring character in a string
    • Java Program to find Reverse of the string
    • Java program to find the duplicate characters in a string
    • Java program to find the duplicate words in a string
    • Java Program to find the frequency of characters
    • Java Program to find the largest and smallest word in a string
    • Java Program to find the most repeated word in a text file
    • Java Program to find the number of the words in the given text file
    • Java Program to separate the Individual Characters from a String
    • Java Program to swap two string variables without using third or temp variable.
    • Java Program to print smallest and biggest possible palindrome word in a given string
    • Reverse String in Java Word by Word
    • Reserve String without reverse() function
    • Linear Search in Java
    • Binary Search in Java
    • Bubble Sort in Java
    • Selection Sort in Java
    • Insertion Sort in Java
    • How to convert String to int in Java
    • How to convert int to String in Java
    • How to convert String to long in Java
    • How to convert long to String in Java
    • How to convert String to float in Java
    • How to convert float to String in Java
    • How to convert String to double in Java
    • How to convert double to String in Java
    • How to convert String to Date in Java
    • How to convert Date to String in Java
    • How to convert String to char in Java
    • How to convert char to String in Java
    • How to convert String to Object in Java
    • How to convert Object to String in Java
    • How to convert int to long in Java
    • How to convert long to int in Java
    • How to convert int to double in Java
    • How to convert double to int in Java
    • How to convert char to int in Java
    • How to convert int to char in Java
    • How to convert String to boolean in Java
    • How to convert boolean to String in Java
    • How to convert Date to Timestamp in Java
    • How to convert Timestamp to Date in Java
    • How to convert Binary to Decimal in Java
    • How to convert Decimal to Binary in Java
    • How to convert Hex to Decimal in Java
    • How to convert Decimal to Hex in Java
    • How to convert Octal to Decimal in Java
    • How to convert Decimal to Octal in Java
    • Java program to print the following spiral pattern on the console
    • Java program to print the following pattern
    • Java program to print the following pattern 2
    • Java program to print the following pattern 3
    • Java program to print the following pattern 4
    • Java program to print the following pattern 5
    • Java program to print the following pattern on the console
    • Java program to print the following pattern on the console 2
    • Java program to print the following pattern on the console 3
    • Java program to print the following pattern on the console 4
    • Java program to print the following pattern on the console 5
    • Java program to print the following pattern on the console 6
    • Java program to print the following pattern on the console 7
    • Java program to print the following pattern on the console 8
    • Java program to print the following pattern on the console 9
    • Java program to print the following pattern on the console 10
    • Java program to print the following pattern on the console 11
    • Java program to print the following pattern on the console 12
    • Singly linked list Examples in Java
    • Java Program to create and display a singly linked list
    • Java program to create a singly linked list of n nodes and count the number of nodes
    • Java program to create a singly linked list of n nodes and display it in reverse order
    • Java program to delete a node from the beginning of the singly linked list
    • Java program to delete a node from the middle of the singly linked list
    • Java program to delete a node from the end of the singly linked list
    • Java program to determine whether a singly linked list is the palindrome
    • Java program to find the maximum and minimum value node from a linked list
    • Java Program to insert a new node at the middle of the singly linked list
    • Java program to insert a new node at the beginning of the singly linked list
    • Java program to insert a new node at the end of the singly linked list
    • Java program to remove duplicate elements from a singly linked list
    • Java Program to search an element in a singly linked list
    • Java program to create and display a Circular Linked List
    • Java program to create a Circular Linked List of N nodes and count the number of nodes
    • Java program to create a Circular Linked List of n nodes and display it in reverse order
    • Java program to delete a node from the beginning of the Circular Linked List
    • Java program to delete a node from the end of the Circular Linked List
    • Java program to delete a node from the middle of the Circular Linked List
    • Java program to find the maximum and minimum value node from a circular linked list
    • Java program to insert a new node at the beginning of the Circular Linked List
    • Java program to insert a new node at the end of the Circular Linked List
    • Java program to insert a new node at the middle of the Circular Linked List
    • Java program to remove duplicate elements from a Circular Linked List
    • Java program to search an element in a Circular Linked List
    • Java program to sort the elements of the Circular Linked List
    • Java program to convert a given binary tree to doubly linked list
    • Java program to create a doubly linked list from a ternary tree
    • Java program to create a doubly linked list of n nodes and count the number of nodes
    • Java program to create a doubly linked list of n nodes and display it in reverse order
    • Java program to create and display a doubly linked list
    • Java program to delete a new node from the beginning of the doubly linked list
    • Java program to delete a new node from the end of the doubly linked list
    • Java program to delete a new node from the middle of the doubly linked list
    • Java program to find the maximum and minimum value node from a doubly linked list
    • Java program to insert a new node at the beginning of the Doubly Linked list
    • Java program to insert a new node at the end of the Doubly Linked List
    • Java program to insert a new node at the middle of the Doubly Linked List
    • Java program to remove duplicate elements from a Doubly Linked List
    • Java program to rotate doubly linked list by N nodes
    • Java program to search an element in a doubly linked list
    • Java program to sort the elements of the doubly linked list
    • Java Program to calculate the Difference between the Sum of the Odd Level and the Even Level Nodes of a Binary Tree
    • Java program to construct a Binary Search Tree and perform deletion and In-order traversal
    • Java program to convert Binary Tree to Binary Search Tree
    • Java program to determine whether all leaves are at same level
    • Java program to determine whether two trees are identical
    • Java program to find maximum width of a binary tree
    • Java program to find the largest element in a Binary Tree
    • Java program to find the maximum depth or height of a tree
    • Java program to find the nodes which are at the maximum distance in a Binary Tree
    • Java program to find the smallest element in a tree
    • Java program to find the sum of all the nodes of a binary tree
    • Java program to find the total number of possible Binary Search Trees with N keys
    • Java program to implement Binary Tree using the Linked List
    • Java program to search a node in a Binary Tree
    • Candy Distribution Problem in Java
    • Find Rectangle in a Matrix with Corner as 1 in Java
    • Minimum Number of Taps to Open to Water a Garden in Java
    • Seven Segment Display Problem in Java
    • Split Array Largest Sum in Java
    • Find Original Array from a Double Array in Java
    • Minimum Lights to Activate Problem in Java
    • Rotate List in Java
    • Count of Range Sum Problem in Java
    • Create A Tree of Coprime in Java
    • Convert Integer to Roman Numerals in Java
    • Check if n and its Double Exist or not in Java
    • Array of Doubled Pair Problem in Java
    • Tag Content Extractor Problem in Java
    • Convert Roman to Integer in Java
    • Minimum Number of Flips to Convert Binary Matrix into Zero Matrix in Java
    • XOR of Array Elements Except Itself in Java
    • Check If the Given Array is Mirror Inverse in Java
    • How to Create a Mirror Image of A 2D Array in Java
    • Add Numbers Represented by Linked Lists in Java
    • Majority Element In an Array in Java
    • Block Swap Algorithm or Array Rotation in Java
    • Minimum Difference Among Group Size Two in Java
    • Missing Number in An Arithmetic Progression in Java
    • Peak Index of Mountain Array Problem in Java
    • Minimum Number of Meeting Room Required Problem in Java
    • Move Zeros to End in Java
    • Count Inversions in an array in Java
    • Count Smaller Elements on The Right Side in Java
    • Interleaving String Problem in Java
    • Bulb Chain Problem in Java
    • Java program to check whether two strings are anagram or not
    • Java Program to find duplicate characters in a string
    • Java Program to Print Spiral Pattern
    • Java Program to reverse each word in String
    • Java Program to check whether one string is a rotation of another
    • Java program to find the percentage of uppercase, lowercase, digits and special characters in a string
    • Java Program to prove that strings are immutable in java
    • Java program to reverse a given string with preserving the position of spaces
    • Nth Node from The End of a Linked List in Java
    • Java Program to capitalize each word in String
    Home › Java Programs › Java Program to find duplicate characters in a string
    next → ← prev

    How do you find duplicate characters in a string?

    7 Jan 2025 | 1 min read

    Following program demonstrate it.

    File: DuplicateCharFinder .java

    Output:

       is 3 times
    i  is 2 times
    n  is 2 times
    y  is 2 times
    

    Next TopicJava program to print spiral pattern

     
    ← prev next →

     

    Related Posts

    • Prime Number Program in Java
    • How to Sort an Array in Java
    • How to convert String to Date in Java
    • Java Program to print the duplicate elements of an array
    • How to convert char to String in Java
    • Java Program to print smallest and biggest possible palindrome word in a given string
    • How to convert int to String in Java
    • Java program to print the following pattern on the console 2
    • Java program to construct a Binary Search Tree and perform deletion and In-order traversal
    • Java Program to remove all the white spaces from a string

    Subscribe to Tpoint Tech

    We request you to subscribe our newsletter for upcoming updates.



    Logo

    We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks

    Contact info

    G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India

    hr@tpointtech.com

    +91-9599086977

    Follow us
    Tpoint Tech Facebook PageTpoint Tech X PageTpoint Tech Linkedin PageTpoint Tech Telegram ChannelTpoint Tech Youtube ChannelTpoint Tech instagram Page
    Tutorials
    Java Data Structures C Programming C++ Tutorial C# Tutorial PHP Tutorial HTML Tutorial JavaScript Tutorial jQuery Tutorial Spring Tutorial
    Interview Questions
    Microsoft Amazon Adobe Intuit Accenture Cognizant Capgemini Wipro Tcs Infosys
    Online Compiler
    C R C++ Php Java Html Swift Python JavaScript TypeScript
    Latest Post | Tutorials List | Privacy Policy | About Us | Contact Us
    © Copyright 2011 - 2025 TpointTech.com. All Rights Reserved.
    TPoint Tech Logo