1.

What Type Of Data Type Conversion Happens When The Compiler Encounters The Following Code?

Answer»

ChildClass CC = new ChildClass();
ParentClass PC = new ParentClass();

Implicit Conversion. For REFERENCE types, an implicit conversion always exists from a class to any one of its DIRECT or indirect base classes or interfaces. No special SYNTAX is necessary because a derived class always CONTAINS all the MEMBERS of a base class.

ChildClass CC = new ChildClass();
ParentClass PC = new ParentClass();

Implicit Conversion. For reference types, an implicit conversion always exists from a class to any one of its direct or indirect base classes or interfaces. No special syntax is necessary because a derived class always contains all the members of a base class.



Discussion

No Comment Found