package samplecode;

interface Shape
{
	double pi=3.14;
	public void getArea(int a);
	
}

class Circle implements Shape
{
	public void getArea(int r)
	{
		double area=pi*r*r;
		System.out.println("Area is"+area);
	}
}

class Exp10 {

	public static void main(String args[])
	{
		Shape c1=new Circle();
		c1.getArea(3);
	}
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: