Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.HashSet;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        String input = "E,E,A,B,C,B,D,C";

        Set<String> set = new HashSet<String>();

        for (String s : input.split(","))
            set.add(s);

        for (String s : set)
            System.out.println(s);
    }
}