Pregunta de entrevista de Icertis

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