public class Person {
private String name;
private int age;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
//parent class
public class Test {
public static void main(String[] args) {
Person p1 = new Person();
p1.setName("Sabbir");
System.out.println(p1.getName());
}
}