List allows duplicates but write logic to dis-allow duplicates in list

```
import  java.util.*;
class ALTest
{
    public static void main(String[] args) {
        ArrayList al=new ArrayList();
        al.add("A");
        al.add("B");
        al.add("A");
        al.add(10);
        al.add(20);
        al.add("List");
        System.out.println(al);
    }
}

```

here A is duplicated it should not be duplicate