Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, the child classes inherit constants from the parent class. The method of accessing them depends on the programming language being used. Generally, constants are accessed using the class name followed by the constant name, such as ClassName::CONSTANTNAME in PHP, or ClassName.CONSTANTNAME in Java.