Delegation in java with example