+ 1
What is the difference between child c= new parent() and parent c= new child()
2 Antworten
+ 3
Supposing than child is a parent subclass, the difference is than child is implicitly safe to be "treated" like a parent but not the opposite.. This because child inherits all behaviours and data from parent while parent not
+ 1
The child class generally contains more functionality and features than the parent class.