Skip to content

Instantly share code, notes, and snippets.

@kzdelarec

kzdelarec/JavaPojo.java

Last active Jul 20, 2020
Embed
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) {
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