Java Coding ProblemsChapter 1: Strings, Numbers, and MathProblem Statement : Counting Duplicate CharactersWrite a program that counts duplicate characters from a given String.Sample Input 1"aabcc" Sample Output 1{a=2, b=1, c=2} Source CodeMain ClassTest ClassQuestion taken from the book "Java Coding Problems" by Anghel Leonard. Formatted and uploaded by dbc2201Suggested Reading:HashMap (Java SE 18 & JDK 18)Managing the Content of a Map (dev.java)