In object oriented programming, can an object include something which is not a variable and/or a procedure?

In object oriented programming, can an object include something which is not a variable and/or a procedure?

Or rather, it must be, by principle, only something which is a variable and/or a procedure?

What do you want to include?

1 Like

There are also class constants.

I don’t have an opinion about this because I never worked in OOP.

I do seek to know what else may come inside a class. @mabismad said also constants which makes sense to me.

This is an old question and is not limited to web development so I will keep it vague.

It largely depends on whether the person is strict about terminology. Many developers would not use the term procedure for classes/objects.