package class6_2_HalfExam3_Problem7_start;// Dr. Yoder. MSOE. 12 April 2017 /** * This example illustrates some of the differences between an abstract method * and an interface. Compare this file with AbstractClass.java */ public interface Interface { static final int Z=5;// Class constant // int x; // Instance variable // static int y; // Class variable // Interface(){} // Constructor // void method() {} // Implementation for an ordinary method // protected abstract void pam(); // Protected abstract method abstract void m2(); // Abstract method static void m3(){} // Class method. New in Java 8. Not a "pure" interface item, even though it is legal. ("Pure interfaces" don't have any implementations.) //http://stackoverflow.com/a/22497 // Not allowed anywhere: // abstract int y; // Variables can never be abstract - they have no bodies to omit. // abstract static void m4(); // Class methods can never be abstract. There is no reference to change at runtime for polymorphism }