class Person {
private int age;
public void setter(int a) {
System.out.println("gtter" + this);
this.age = a;
}
public int getter() {
System.out.println("gtter" + this);
return this.age;
}
}
public class Demo1 {
public static void main(String[] args) {
Person p = new Person();
p.setter(80);
p.getter();
int b = p.getter();
}
}
gtterPerson@15db9742
gtterPerson@15db9742
gtterPerson@15db9742