Java program to create an employee class by inheriting Person class
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
In this program, we will create a Person class and then create a new class Employee by inheriting the features of the Person class using the "extends" keyword.
Program/Source Code:
The source code to create an employee class by inheriting the Person class is given below. The given program is compiled and executed successfully.
Output: