For eg:
ParentObj A = new ChildObj();
((ChildObj) A).childMethod();
I see lots of instances like this in object oriented programming, would it be easier to just declare the ChildObj as ChildObj A = new ChildObj()
instead of using the parent object as the starter of the of the creation of the object?
What would be the use cases of this example to any object oriented programming?
And will the A object be the ChildObj in this declaration or ParentObj?
Is there like a performance boost and such as to doing it this way or its a use case base thing if there is any?
thanks noob here.