Skip to content

Instantly share code, notes, and snippets.

Last active Jul 20, 2020
What would you like to do?
//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) { = name; = email; = 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