class A
{
int count;
public A(){};
public A(int count)
{
this.count=count;
}
public String toString()
{
return this.count+"";
}
public boolean equals(Object obj)
{
if(this==obj)
{
return true;
}
if(obj!=null&&obj.getClass()==A.class)
{
A a=(A)obj;
if(this.count==a.count)
{
return true;
}
}
return false;
}
public int hashCode()
{
return (int)this.count;
}
}
public class TestHashSet
{
public static void main(String[]args)
{
A Second=new A();
HashSet hs=new HashSet();