CODEBANK-4 测试 Default 关键字
This commit is contained in:
parent
f899e569fd
commit
d315f812a5
|
@ -12,21 +12,34 @@ import java.util.Properties;
|
|||
*
|
||||
* @author YuCheng Hu
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
interface TestInterface1 {
|
||||
// default method
|
||||
default void show() {
|
||||
System.out.println("Default TestInterface - 1 ");
|
||||
}
|
||||
}
|
||||
|
||||
interface TestInterface2 {
|
||||
// Default method
|
||||
default void show() {
|
||||
System.out.println("Default TestInterface - 2");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Main implements TestInterface1, TestInterface2 {
|
||||
private static final Logger logger = LoggerFactory.getLogger(Main.class);
|
||||
|
||||
private static Options options = new Options();
|
||||
private static Properties properties = new Properties();
|
||||
|
||||
private static CommandLine cl = null;
|
||||
|
||||
private static boolean dryRun = false;
|
||||
private static int limit = 0;
|
||||
private static boolean force = false;
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
new Main().show();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
TestInterface1.super.show();
|
||||
TestInterface2.super.show();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue