6
What is the output of the following program?
interface Shape { double area(); default String name() { return "shape"; } }
class Sq implements Shape { public double area() { return 4; } }
class Main { public static void main(String[] args) { Shape s = new Sq(); System.out.println(s.name() + " " + s.area()); } }DiscussMedium