Given an input string, Write a java code to find duplicate characters in a String.
For example :
Example 1:
Input : “Java”
Output : a
The character a appears more than once in a string.
Example 2:
Input : “programming”
Output : m,g,r
These three characters (m, g, r) appears more than once in a string.