Pergunta de entrevista da empresa Icertis

Java code on removing the duplicate special characters (only) from a string