Question 8
Consider the code given below.
interface Shape { public double area(); public static void printArea(double a) { System.out.println("Area is : " + a); }}
class Circle implements Shape { private double radius; public Circle(double r) { radius = r; } public double area() { return Math.PI * radius * radius; }}
public class TestShape { public static void main(String[] args) { Circle c = new Circle(2); ____________________________________ //LINE 1 }}Identify the appropriate option to fill in the blank at LINE 1, such that the output is:
Area is : 12.566370614359172