InstantiateInterfaceExample -- creating class instances that implement an interface.

Instances of different classes can implement the same interface.


To see this example in action:
  1. Compile the Java source file, InstantiateInterfaceExample.java:
    	javac InstantiateInterfaceExample.java
    
  2. Run the class:
    	java InstantiateInterfaceExample
    


Output:
    Hello world!
    7913

The source.