0
$\begingroup$

Is there an explicit term for a member of a class that is not inherited from any parent class?

class Vehicle {
    int weight;
}

class Car extends Vehicle {
    int numDoors;
}

Car car = new Car();
car.weight = 10000; // weight is an "inherited member"
car.numDoor = 4; // what's the term for numDoor?
$\endgroup$
2
$\begingroup$

Just a member variable. If you want to specify that it is not inherited, I suppose you could call it 'noninherited member variable'. Wiktionary lists this as a term in computing.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.