Write a program in java to demonstrate interface?

interface Inter

{

                int a=7;

                void display();

}

class Interface implements Inter

{

                public void display()

                {

                                System.out.println("Interface");

                }

                public static void main(String arg[])

                {

                                Inter x=new Interface();

                                x.display();

                }

}

, , , , , ,

Leave a Reply