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.
Asked: 2023-05-06 08:10:42 +0000
Seen: 14 times
Last updated: May 06 '23