constructors explained in detail with examples