Professional Documents
Culture Documents
Inhertance Super
Inhertance Super
Instance Method:
Create another class MobileDemo and in main method create object of sub class
SmartPhone and call all the methods.
Finally create a class DeveloperDemo and inside main method create the object
of FullStackDeveloper class and call all the methods.(You can take hard coded
values)
Note: In getData() of all sub class use super keyword to call super class method
getData().