Skip to content

Instantly share code, notes, and snippets.

@kzdelarec
Last active July 20, 2020 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kzdelarec/73ce2ca8848c3c3e72f0271d32ff3930 to your computer and use it in GitHub Desktop.
Save kzdelarec/73ce2ca8848c3c3e72f0271d32ff3930 to your computer and use it in GitHub Desktop.
//Customer POJO class to represent entity Customer
class Customer(val name: String, val email: String, val company: String)
public class Customer{
String name;
String email;
String company;
//constructor to initialise fields
public Customer(String name, String email, String company) {
this.name = name;
this.email = email;
this.company = company;
}
//getter method for name
public String getName() {
return name;
}
//getter method for email
public String getEmail() {
return email;
}
//getter method for company
public String getCompany() {
return company;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment