Skip to content

Instantly share code, notes, and snippets.

@Busata
Created July 13, 2016 14:34
Show Gist options
  • Save Busata/716646ef9bbacff237aceb82756752a5 to your computer and use it in GitHub Desktop.
Save Busata/716646ef9bbacff237aceb82756752a5 to your computer and use it in GitHub Desktop.
public class Person {
private final String firstName;
private final String lastName;
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
}
vs
class Person(val firstName: String, val lastName: String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment