Is there a way to create class in kotlin with fiel...
# android
v
Is there a way to create class in kotlin with fields only, for example if we do this in java:
Copy code
public class User {
    public final String name;
    public final int age;

    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }
}
We will have a class with just 1 method for constructor. But would be great to re use kotlins named parameters.