Say I have the following constructor for the class MyClass
:
public MyClass(int my_property) {
Object(my_property: my_property);
}
and then this constructor, which should be equivalent according to this guide:
public MyClass(int my_property) {
this.my_property = my_property;
}
I want to know if there’s something different going on under the hood. Also, where should I choose each of these over the other? I’ve seen the former used in most scenarios.