Just the way it allows you to create an inmutable class in a single line already makes it way easier to read, while also saving time.
Compare Java:
public class Person {
private final String name;
private final int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
}
Just the way it allows you to create an inmutable class in a single line already makes it way easier to read, while also saving time.
Compare Java:
With Kotlin: