Frage im Vorstellungsgespräch bei Tech Mahindra

Write a Java code to print the repetitive character from String.