Remove duplicates from string Java.