public class Animal
{
public Animal()
{
Console.Writeline("Animal");
}
}
public class Snake : Animal
{
public Snake()
{
Console.Writeline("Snake");
}
}
How many objects will be created in each of the following codes below?
(Refer to the above code...)
Animal myAnimal = new Animal();
Snake mySnake = new Snake();
Animal myAnimal = new Snake();