inheritance problem

  • Thread starter Thread starter goldie11
  • Start date Start date
G

goldie11

Hi,

I have two classes - A,B that inherit from an abstract class C.
The problem is that I need a global field which has always the same
value for the two classes. If I put the field in class C -
As I understand inheritance - both classes will recognize the field
but will have their own values.
Please help.

Thanks.
Ruthie.
 
You need a static (class) variable.

Peter








- Show quoted text -

Thanks Peter .
My problem is solved - thanks. I just started to really understand all
the inheritance stuff.
 
Back
Top