Paul Clapham wrote:
Swapnil Sanghai wrote:@ Paul Clapham - Apart from this I wanted to know other way to handle this situation.
Okay, you could also use a setter method in the User class and pass the Target reference in that way. I will leave you to modify my example to do that.
Campbell Ritchie wrote:Do you mean pass them as method arguments or as constructor arguments?