How can I call a method every time when constructor is executed? In other words, Within a class, can I somehow call another method as soon as constructor is completed?
You can just call the method as the last line of the constructor.
Alternatively if you don't own the class you can go for Aspect Oriented Programming ( http://en.wikipedia.org/wiki/Aspect_oriented_programming )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With