Run-time type identification? RTTI?
If we have a reference to a base class, this reference can also be used as a reference to the subclass, and now we want to know what the type of reference is.
When there is a lot of information missing from the subclass to the base class, such as having a human object that can be seen as an object in a universal sense, it can also become an object, but we don't know if the object is human.
Rtti is exactly the type of object that is recognized during operation.
If you encounter a particular programming problem, you need to know the specific type of reference to solve the problem.
A class object is required for the generation of the object, and forname (arg0) can obtain the object's class object, resulting in an instance of the class.
The Java compiler does not allow downward auto-conversions unless explicitly specified.
Circle C = (circle) b;
The keyword instanceof tells us that an object is not an instance of a particular class.
It can be used for checking down when converting.
Isinstanceof () can be used directly on object instances
The class object is important, here
Rtti and reflection mechanism
Java run-Time type authentication