Posts

Showing posts from March, 2011

Calling one constructor from another using "this(...)"

Instead of calling the constructor with the class name, use the keyword this.


public Contract() {
//some stuff here
}



public Contract(Integer salesid) {
this();
this.id = salesid;
}