for-coder
438 subscribers
99 photos
52 videos
23 files
136 links
Download Telegram
class Person {
private String name;
private Address address; // Address object stored privately

public Person(String name, Address address) {
this.name = name;
this.address = new address; // indirect assignment of the object I.e copy
}

public String getName() { //getter method for the name
return name;
}

public Address getAddress() { //getter method for the Address
return address;
}
}

#Friday #quiz