Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

constuctor calling other constructor

Hi,

I was reading as below

For one constructor to invoke another constructor, we use this keyword and pass
arguments within the parenthesis. Ex: this(10), this(10, ‘a’) etc.


I never remember calling one constructor from other constructor.
Which scenarios we need to call like above. what are practical uses of it. Please advise
ASKER CERTIFIED SOLUTION
Avatar of CPColin
CPColin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial