Qentelli interview question

Java program String reverse remove duplicate string