Answer the question
In order to leave comments, you need to log in
How to understand the creation of a child instance of the parent's type?
Found in one example such code.
Parent obj = new Child();
obj.method();
Answer the question
In order to leave comments, you need to log in
https://docs.oracle.com/javase/tutorial/java/IandI...
https://www.tutorialspoint.com/java/java_inheritan...
www.java2s.com/Tutorial/Java/0100__Class-Definitio. ..
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question