From d315f812a56dae5076df8809c3fa96bd7a8328f7 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Sat, 28 Oct 2023 01:13:14 -0400 Subject: [PATCH] =?UTF-8?q?CODEBANK-4=20=E6=B5=8B=E8=AF=95=20Default=20?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ossez/toolkits/codebank/Main.java | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/Main.java b/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/Main.java index 58638946c4..9e82ce7662 100644 --- a/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/Main.java +++ b/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/Main.java @@ -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(); + } }