Added Java constructor