For example, in Java you would add a listener without using lambda as below
view.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
}
});
But this could be replaced in Kotlin some like this
view.setOnCheckedChangeListener({ compoundButton, b -> true})
How is the new instance creation part handled? Does lambda handle the creation of object instance?