import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        String str = "thisismanasa";
        char[] ch = str.toCharArray();
        String st = "";
        Map<Character, Integer> hashmap = new HashMap<>();
        for(Character c : ch){
            if(!hashmap.containsKey(c)) {
                st = st+c;
                hashmap.put(c,1);
            }
        }
        System.out.println(st);
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: