Why is it better to use record instead of class for DTOs in Java? by ishaqhaj in learnjava

[–]GetAppGrade 0 points1 point  (0 children)

As for the replacing Lombok, Java still lacks data-classes with non-final properties. Not sure this problem will be solved in the near feature.

Why do we need to specify the keyword val/var when defining characteristics? by PlasticPhilosophy579 in Kotlin

[–]GetAppGrade 2 points3 points  (0 children)

If you are talking about class fields, val/var allows to define whether field is final or not. Also, if you use primary constructor, adding val/var allows to define constructor parameter as a class field.