import java.io.*;
interface Printable{
void print();
}
interface Showable(){
void show();
}
public class interfaceexample implements Printable,Showable
{
public void print(){
System.out.println("Hello");
}
public void show(){
System.out.println("Welcome!!");
}
public static void main(String a[]) throws Exception
{
System.out.println("Welcome to the interfaceexample project!");
interfaceexample obj = new interfaceexample();
obj.print();
obj.show();
}
}http://www.programmr.com/Java/interface_example
Comments
Post a Comment