Objects not being added by constructor to a list of all objects
<pre><code>class Users{    
    private LinkedHashSet&lt;Users&gt; userList=new LinkedHashSet&lt;Users&gt;();
    private String name;
        public Users(String name){
            this.name=name;
            userList.add(this);
        }
        public void iterateList(){
            for (Users user:userList){
                System.out.println(user.getName()); //NO OUTPUT WHEN CALLED
            }
        }
       public int getTotalUserCount(){
            return userList.size(); // OUTPUT IS 0
        }
}
</code></pre>

<p>I'm trying to add the instances of <code>Users</code> to <code>userList</code> when they are created. For some reason, when the <code>userList</code> is iterated through, I find that the objects weren't added. </p>

<p>Also, 
However, an accessor method <code>getName()</code>  works when called on the object individually. </p>

<p>What am I doing wrong?</p>