package javaapplication25;
interface shape
{
void area();
}
class square implements shape
{
float s;
public void area()
{
System.out.println("area of square is "+s*s);
}
}
public class JavaApplication25 {
public static void main(String[] args)
{
square s= new square();
s.s=10;
s.area();
}
}
No comments:
Post a Comment