package com.homework1; public interface InterfaceA { //声明抽象方法 void printCapitalLetter(); }
package com.homework1; public interface InterfaceB { //声明抽象方法 void printLowercaseLetter(); }
package com.homework1; public class Print implements InterfaceA, InterfaceB { @Override public void printLowercaseLetter() { System.out.println("abcdefghigklmnopqrstuvwxyz"); } @Override public void printCapitalLetter() { System.out.println("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); } }
package com.homework1; public class Print implements InterfaceA, InterfaceB { @Override public void printLowercaseLetter() { System.out.println("abcdefghigklmnopqrstuvwxyz"); } @Override public void printCapitalLetter() { System.out.println("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); } }