reset password
Author Message
kmayho
Posts: 62
Posted 11:07 Oct 15, 2015 |

how do I Use the address object to fill in the address field of the person object?

I tried to use the setter of the address object in person but that didn't do anything and i tried to set them equal. 

Any tips?  

thank you

msargent
Posts: 519
Posted 11:12 Oct 15, 2015 |

If the variable for your Person is person, try

System.out.println(person.getAddress().toString()); to test.

Last edited by msargent at 11:13 Oct 15, 2015.
kmayho
Posts: 62
Posted 11:17 Oct 15, 2015 |

for the person.setAddress, we both the whole address with strings and integers?

when i do what you suggested I get a java.lang.NullPointerException