title: How to remove duplicate elements from this list, without using Set?
body: <pre><code>class A {
      public static void main(String args[]) {
          List&lt;Emp&gt; l=new ArrayList&lt;Emp&gt;();
          l.add(new Emp(1,23000,"ram");
          l.add(new Emp(2,24000,"aam");
          l.add(new Emp(1,23000,"ram");
      }
  }
  
  class Emp {
      int id, salary, name;
  
      Emp(int id, int salary,int name) {
          this.id=id;
          this.salary=salary;   
          this.name=name;
      }
  }
  </code></pre>