Skip to content

Instantly share code, notes, and snippets.

@venkatsgithub1
Created October 22, 2017 14:03
Show Gist options
  • Save venkatsgithub1/aa76231bd70fcedec88d3ac8aadbbcc5 to your computer and use it in GitHub Desktop.
Save venkatsgithub1/aa76231bd70fcedec88d3ac8aadbbcc5 to your computer and use it in GitHub Desktop.
A small introduction to lambdas in Java: Person class
package demo.java.lambdas;
public class Person {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return this.name;
}
public int getAge() {
return this.age;
}
@Override
public String toString() {
return "Person: Name-> " + this.name + " Age-> " + this.age;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment