Click here to watch in Youtube :https://www.youtube.com/watch?v=H4wixwtXXiE&list=UUhwKlOVR041tngjerWxVccwEmployee.java public class Employee
{
private String name;
private int age;
private Employee()
{
System.out.println("Inside Employee() constructor");
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public int getAge()
{
return age;
}
public void setAge(int age)
{
this.age = age;
}
}
EmployeeDemoTest.java public class EmployeeDemoTest
{
public static void main(String[] args)
{
Employee employeeObject1 = new Employee();
System.out.println("Name : " + employeeObject1.getName());
System.out.println("Age : " + employeeObject1.getAge());
}
}