运行 ❯
获取您
自己的Java
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
interface FirstInterface { public void myMethod(); // interface method } interface SecondInterface { public void myOtherMethod(); // interface method } // DemoClass "implements" FirstInterface and SecondInterface class DemoClass implements FirstInterface, SecondInterface { public void myMethod() { System.out.println("Some text.."); } public void myOtherMethod() { System.out.println("Some other text..."); } } class Main { public static void main(String[] args) { DemoClass myObj = new DemoClass(); myObj.myMethod(); myObj.myOtherMethod(); } }
一些文字...
其他一些文字...