Automatic id generation
<p>Any one have idea how to generate <code>id</code> starting from 1 so that the next object has 2 and so on?</p>

<p>I have trying the following but dose not work:</p>

<pre><code>class students{

    private int id;
    private String name;

    public student(String name){
        this.id=id++;
        this.name
    }
}
</code></pre>
