add notes on passing objects to java constructors, + code example