LogiQuest
Back to Polymorphism
5

What is the output of the following program?

Shape s = new Sq(); Console.WriteLine(s.Area());
abstract class Shape { public abstract double Area(); }
class Sq : Shape { public override double Area() => 4; }
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.