Hi Sang,

I have the same question. I code this in Main:

MyOwnInterface me = new Person(100, 200, "Luis", "Martinez", 999, "Calle 
Piombo", "Mexico");

System.out.println("Direccion1 (should not be necessary concatenate): " + 
me.getAddress().getStreetNumber() + " " + me.getAddress().getStreetName() + 
", " + me.getAddress().getCountry());

System.out.println("Direccion2 (fail): " + me.getAddress());

 
I supossed getAddress() shuold return the concatenated full address, but 
that's not what I got.

Any clues?

Thank you

Luis

On Monday, January 7, 2013 8:28:13 PM UTC-6, Jason Williams wrote:
>
> Are we supposed to be initializing the person object with address 
> information and then be able to return it using getAddress()?  I'm bit 
> confused as to when the AddressImpl class we created is being used in this 
> program.
>
> On Thursday, October 4, 2012 3:48:28 PM UTC-4, Mike T. wrote:
>>
>> Hi,
>>
>> For the Java Programming, javase_interface  homework:
>>
>> I'm not sure what this means: 
>>
>> Write an interface called MyOwnInterface, which has the following method 
>> AddressInterface getAddress(); 
>>
>> How can AddressInterface interface be a type for the getAddress method? 
>>
>> I didn't see examples of this in the *.pdf and examples from the lab. 
>>  I'm not sure really how to go about defining
>> getAddress then if it passes back an interface of type AddressInterface.
>>
>> Thanks in advance,
>> Mike T.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"JPassion.com: Java Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/jpassion_java?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to