Skip to main content
Known Participant
August 8, 2013
Answered

Extends

  • August 8, 2013
  • 1 reply
  • 589 views

Hi guys!

This might be a dumb question, but I think I'm really missing something...

Lets say I have 3 classes A B and C, class A extends C and class B also extends C.

Now, does this mean that class C is created 2 times in memory (one for A and one for B) or class C is only created once and then shared between A and B?

Thank you!

This topic has been closed for replies.
Correct answer kglad

C is added to memory once and reused.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 8, 2013

C is added to memory once and reused.

Sason922Author
Known Participant
August 8, 2013

Thought so...Thank you.

kglad
Community Expert
Community Expert
August 8, 2013

you're welcome.