Sat Aug 29, 2009 3:42 am
interface shape
{
public void draw();
}
public class square implements shape {
{
System.out.println("Am a shape");
}
static {
System.out.println("square is implementing the shape . ");
}
public void draw(){
System.out.println("Drawing a shape !!! ");
}
public static void main(String args[])
{
new square().draw();
}
}
square is implementing the shape .
Am a shape
Drawing a shape !!!
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.