package com.java8.logical_Programs; public class Employee { private int empId; private String name; private String dept; public Employee(int empId, String name, String dept) { this.empId = empId; this.name = name; this.dept = dept; } public int getEmpId() { return empId; } public void setEmpId(int empId) { this.empId = empId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDept() { return dept; } public void setDept(String dept) { this.dept = dept; } @Override public String toString() { return "Employee{" + "empId=" + empId + ", name='" + name + '\'' + ", dept='" + dept + '\'' + '}'; } }