I'm studying about operator overloading in kotlin and I ran into invoke
method. When I did my research about it I found out it works much similar to init
constructor of every class.
I cannot get my head around the difference and they seem to be alike because everything we do in invoke
method, it can be done in init
constructor as well.
so what is the difference and when should we use each?