Last active
October 26, 2016 18:23
-
-
Save kabutz/9946f424c621d9f3b1782484d40228e4 to your computer and use it in GitHub Desktop.
It is possible to compile this code with JDK 8, but not with JDK 9. What can happen when you run it? Vote here: https://twitter.com/heinzkabutz/status/791220763059781632
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Brick { | |
public Brick() { | |
greet(); | |
} | |
public abstract void greet(); | |
} | |
public class HardPlace { | |
public class Between extends Brick { | |
public void greet() { | |
System.out.println("Hello " + assert); | |
} | |
} | |
private final String assert; | |
public HardPlace(String assert) { | |
this.assert = assert; | |
} | |
public void test() { | |
new Between(); | |
} | |
public static void main(String[] assert) { | |
new HardPlace("Franz").test(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, deleting any comments that contain spoilers ...