diff options
Diffstat (limited to 'tests/bugs196/java14/Jep305.java')
-rw-r--r-- | tests/bugs196/java14/Jep305.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/bugs196/java14/Jep305.java b/tests/bugs196/java14/Jep305.java deleted file mode 100644 index 3c526aef3..000000000 --- a/tests/bugs196/java14/Jep305.java +++ /dev/null @@ -1,22 +0,0 @@ -class Orange { - public String name1 = "orange"; -} - -class Apple { - public String name2 = "apple"; -} - -public class Jep305 { - public static void main(String []argv) { - print(new Orange()); - print(new Apple()); - } - - public static void print(Object obj) { - if (obj instanceof Orange o) { - System.out.println(o.name1); - } else if (obj instanceof Apple a) { - System.out.println(a.name2); - } - } -} |